Install Service Action

Declaration

<AMSERVICEINSTALL EXECUTABLE="text" DISPLAYNAME="text" USERNAME="text" PASSWORD="text" ERROR="text [options]" SERVICETYPE="text [options]" RUNTYPE="text [options]" INTERACTIVE="yes/no">

See Also

Install Service Action-Setting Properties, List Services Action, Pause Service Action, Remove Service Action, Resume Service Action, Start Service Action, Stop Service Action

Description

Installs the specified service into the SCM (Service Control Manager) so that it can be started and stopped. Administrator privileges are usually required to perform this action.

NOTE: Services do not run on Windows 95/98/ME.

Practical Usage

Used to install a new service onto the system.

Parameters

General Tab

Executable

Text, Required
MARKUP: EXECUTABLE="c:\foldername\servicename.exe"

Specifies the service to resume.

Display Name

Text, Required
MARKUP: DISPLAYNAME="My Service"

Specifies the name of the service as it should appear in the list of services.

Username

Text, Optional - None
MARKUP: EXECUTABLENAME="c:\foldername\servicename.exe"

Specifies the username that service should use to log on. The Service automatically inherits the rights of the user specified in this field.

Password

Text, Optional - None
MARKUP: EXECUTABLENAME="c:\foldername\servicename.exe"

Specifies the password corresponding to the username.

Error Severity

Text [options], Optional
MARKUP: ERROR="critical"

If the service generates an error, specifies how the error should be written to the system event log.

The available options are:

Service Type

Text [options], Optional
MARKUP: SERVICETYPE="shared_process"

If the service generates an error, specifies how the error should be written to the system event log.

The available options are:

Run Type

Text [options], Optional
MARKUP: RUNTYPE="manual"

If the service generates an error, specifies how the error should be written to the system event log.

The available options are:

Interactive Service

Text [options], Optional Default - NO
MARKUP: INTERACT="YES"

Specifies that the service should be able to interact with the desktop.

Notes

Custom Description

This action includes the Description tab for entering a custom step description.

More on setting custom step description

Standard Error Handling Options

This action also includes the standard Error Causes and On Error failure handling options/tabs.

More on Error Handling Options

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

<AMSERVICEINSTALL EXECUTABLE="c:\foldername\myservice" DISPLAYNAME="My Custom Service App" USERNAME="MyUserName" PASSWORD="">