Command Reference

Query Service

Queries the user's system for the status of a specified service. The status will be stored in a user defined variable.

NOTE: This action only works on Windows NT/2000/XP and has no effect on Windows 9x/ME. For more information about services, please read a book on the subject or search for more infromation online. You should not haphazardly experiment with the services on your or anyone else's system as this could cause major problems with the operating system. The service actions were put into this product for those who know how to use them and require their functionality.

Action ID: 61
Action Category: Services

Settings

Display Name

Find service by display name:

If checked, the setup will attempt to find the service by it's display name.

Display name:

The display name that the setup will use in order to find the service if Find service by display name is checked.

Key Name

Find service by key name:

If checked, the setup will attempt to find the service by it's key name.

Key name:

The key name that the setup will use in order to find the service if Find service by key name is checked.

Variable

Variable:

The name of the variable to store the result in. The result will be one of the following:

NOT_FOUND

-

The service could not be located using the supplied parameters.

STOPPED

-

The service is currently stopped.

START_PENDING

-

The service is going to start.

STOP_PENDING

-

The service is going to be stopped.

RUNNING

-

The service is currently running.

CONTINUE_PENDING

-

The service is going to continue.

PAUSE_PENDING

-

The service is going to be paused.

PAUSED

-

The service is currently paused.

Return Values

Value
(%LastErrorNum%)

Simple Message
(%LastErrorMsg%)

Verbose Message
(%LastErrorDetails%)

0 (OK)

 

 

1

Failed to query service.

Iterate services failed.
<<Display Name>>
<<Key Name>>

2

Failed to query service.

Query service failed.
<<Display Name>>
<<Key Name>>

Examples

None available.

 

See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab