PauseService Method

Action2 Example

Windows NT Machines Only

 

Encapsulates the AutoMate™ action in the “Services” group, “Pause a service.” The method attempts to pause the specified service.

 

Declaration

function PauseService (varServiceName As Variant) As Integer

 

Parameters

varServiceName

 The name of the service (as it appears in the SCM) to be paused.

 

Description

The PauseService method attempts to pause the service named varServiceName. The service must have the ability to be paused and unpaused. Check the documentation for the service if you are unsure whether or not it supports pausing.

 

Use the ContService method to continue a service that has been paused.

 

The method returns ”0” if the service was paused successfully; otherwise it returns “1.” Use the GetLastError property to retrieve the error message generated by a failed pause attempt.