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])

Parameters

ExePath
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.
CommandLine
Specifies the command line to execute. This parameter can be NULL, in which case the ExePathparameter is used as the command line.
Wait
Specifies whether the function waits for the launched process to terminate.
TimeOut
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).
ForceTermination
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.
ExitCode
Returns the exit code of the launched process. This parameter is optional and is not available if Waitis False.

Return Value

Boolean

Remarks

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.

Requirements

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 momsdk@microsoft.com.