AppCtrlScript

MAY Computer

Help

GETSERVICESTATE

Applies to  

AppCtrlScript (Module: wmACScr1.dll)

Group  

Service

See also  

GETSERVICENAME, STARTSERVICE, STOPSERVICE, PAUSESERVICE, CONTINUESERVICE

Retrieves the current state of the specified service. As service name the internal service name must be used. Often the internal service name is identical with the name displayed in control-panel->Services but not always. If you are not sure about the internal service name, it can be retrieved with the GETSERVICENAME command.

The result will be one of:

Stopped
Running
Paused
Start Pending
Stop Pending
Pause Pending
Continue Pending

Syntax

GETSERVICESTATE <VariableName>, <ServiceName>[, <Host>]
GETSERVICESTATUS <VariableName>, <ServiceName>[, <Host>]

Part

Description

<VariableName> Script variable where to store the result.
<ServiceName> Internal service name. If not available use the GETSERVICENAME command to retrieve it.
<Host> Optional host name; if omitted the local host is assumed.