Services - Install

Declaration

<AMSERVICES ACTIVITY="install" EXECUTABLE="text" DISPLAYNAME="text" USERNAME="text" PASSWORD="text (encrypted)" />

Related Topics   

Description

Installs the specified service into the Service Control Manager (SCM) so that it can be started and stopped. This activity supports installation of a service onto the local machine or a remote machine.

Practical Usage

Used to install a service onto the local or remote system. Administrator privileges are usually required to perform this activity.

Parameters

Service

Property

Type

Required

Default

Markup

Description

Path to service executable

Text

Yes

(Empty)

EXECUTABLE="c:\service.exe"

The path and file name of the service to install. Note that the executable file must be present on the target machine prior to installation. Additionally, when installing to a remote machine, the path to the service should be expressed in terms of the file's location on that machine. For example, the path should be entered like this: "c:\servicename.exe" and not like this: "\\computername\c$\servicename.exe".

Display name

Text

Yes

(Empty)

DISPLAYNAME="My Service"

The name of the service as it should appear in the Service Control Manager (SCM).

Service account username

Text

Yes

(Empty)

USERNAME="username"

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

Service account password

Text

Yes

(Empty)

PASSWORD="password"

The password corresponding to the service account username.

Error severity

Text (options)

No

Normal

  1. ERROR="normal"

  2. ERROR="ignore"

  3. ERROR="critical"

  4. ERROR="severe"

If the service generates errors, indicates how the errors should be written to the system event log. The available options are:

  • Normal (default) - Errors are logged as normal.

  • Ignore - Errors are ignored.

  • Critical - Errors are logged as critical.

  • Severe - Errors are logged as severe.

Service type

Text (options)

No

Own Process

  1. SERVICETYPE="own_process"

  2. SERVICETYPE="shared_process"

  3. SERVICETYPE="kernel_drive"

  4. SERVICETYPE="file_system"

The type of service to install. The available options are:

  • Runs in own process (default) - The service runs in it's own process space.

  • Shared process - The service runs in a shared process space.

  • Kernel driver - The service is a kernel driver.

  • File system - The service is a file system driver.

Run type

Text (options)

No

Automatic

  1. RUNTYPE="automatic"

  2. RUNTYPE="manual"

  3. RUNTYPE="disabled"

  4. RUNTYPE="boot"

  5. RUNTYPE="system"

The service startup type. The available options are:

  • Automatic (default) - The Service is started automatically as part of the Windows boot process.

  • Manual - The Service can be started by another application or process that needs it, but is off by default. Once it is started, the service will remain on until it is manually stopped or the system is rebooted.

  • Disabled - The Service will not start unless this condition is changed.

  • Boot - Driver specific setting.

  • System - Driver specific setting.

Interactive Service

Yes/No

No

No

INTERACT="YES"

If selected, specifies that the service should be able to interact with the desktop. This parameter is disabled by default. Although typically services do not have a user interface, developers can add forms and other UI components. In such cases, this parameter should be selected.

Computer

Property

Type

Required

Default

Markup

Description

Local computer

---

---

---

---

If enabled, indicates that this activity will install a service on the local computer. This parameter is enabled by default. If this parameter is selected, the Another computer parameter becomes inactive. This is a visual mode parameter used during design time only, therefore, it contains no markups.

Another computer

---

---

---

---

If enabled, indicates that this activity will install a service on a remote computer. The parameters below become active if this parameter is enabled. This is a visual mode parameter used during design time only, therefore, it contains no markups.

Computer

Text

Yes

(Empty)

REMOTEMACHINE="MachineName"

The computer name of the remote machine in which to connect to.

Domain

Text

Yes

(Empty)

REMOTEDOMAIN="DomainName"

The domain that the remote machine belongs to.

Username

Text

Yes

(Empty)

REMOTEUSERNAME="Username"

A valid username used to log onto the remote machine. This user must have proper permissions to modify services on the remote machine.

Password

Text

Yes

(Empty)

REMOTEPASSWORD="password"

The password associated with the username entered above.

 

Description

Error Causes

On Error

Example

NOTE:
  • The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
  • Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.

Description

Install service "c:\servicesname.exe" as "service name"

NOTE: This example is for the purpose of viewing AML syntax only. Installing an unwanted service might yield negative results.

<AMSERVICES ACTIVITY="install" EXECUTABLE="c:\servicesname.exe" DISPLAYNAME="service name" USERNAME="username" PASSWORD="AM1H2tpzU1xiDLOlojMcSAm1fn5M3MxiXeEaME" />