BounceService Method

Starts and stops the specified Windows NT service and queries the service status to ensure the service has started. This method will time out after two minutes.


obj.BounceService(ServiceName String, [ComputerName String], [Arguments String])
Where obj is an OpScrUtil.SCManager object.


ServiceName Specifies the name of the service to start.
ComputerName Specifies the target computer. This parameter is optional. If not specified or an empty string, the local computer is the target.
Arguments Specifies arguments to service being bounced. This parameter is optional.

Return Type



To bounce the messenger service on the local computer, enter:

Set obj = CreateObject("OpScrUtil.SCManager")
bOK = obj.BounceService("Messenger", "")