Microsoft Operations Manager

CreateProcess Method

The CreateProcessmethod creates a new Windows NT process. This method optionally waits for the process to exit and returns the exit code. If the process does not end within the specified time-out period, it can be forcefully terminated.

[VBScript] Utility.CreateProcess(ExePath
String, CommandLine String, Wait Boolean, [TimeOut Variant],
[ForceTermination Variant], [ExitCode Variant])


Specifies the module to execute. This parameter can be NULL, in which case the module name must be the first white space-delimited token in ExePath.
Specifies the command line to execute. This parameter can be NULL, in which case the ExePathparameter is used as the command line.
Specifies whether the function waits for the launched process to terminate.
Specifies the length of time, in seconds, to wait for the launched process if the Waitparameter was specified. This parameter is optional and defaults to 120 (the default is adjustable in the registry).
Specifies whether the function terminates the launched process after the time-out has been reached. This parameter is optional. This parameter returns True or False to indicate whether the process was forcibly terminated.
Returns the exit code of the launched process. This parameter is optional and is not available if Waitis False.

Return Value



The Utilityobject should not be used when creating new scripts. It is included only to support existing scripts. For more information about equivalent APIs, see Using Operating System APIs in Scripts.


Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1

See Also

Utility Object

Did you find this information useful? Please send your suggestions and comments about the documentation to