Service.Query

number Service.Query ( 

string DisplayName,

string KeyName = "" )

Description

Queries the system for the status of a specific service.

Parameters

DisplayName

(string) The display name of the service that you wish to query.

KeyName

(string) The key name of the service that you wish to query.

Returns

(number) A number containing the status of the specific service. Can be one of the following:

CONSTANT

VALUE

DESCRIPTION

SERVICE_NOT_FOUND

0

The service was not found.

SERVICE_STOPPED

1

The service is not running.

SERVICE_START_PENDING

2

The service is starting.

SERVICE_STOP_PENDING

3

The service is stopping.

SERVICE_RUNNING

4

The service is running.

SERVICE_CONTINUE_PENDING

5

The service continue is pending.

SERVICE_PAUSE_PENDING

6

The service pause is pending.

SERVICE_PAUSED

7

The service is paused.

SERVICE_ERROR

-1

Returned on error.

You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.

See also:  Related Actions