Services - Stop

Declaration

<AMSERVICES ACTIVITY="stop" SERVICE="text" STOPIFMASTER="YES/NO" />

Related Topics   

Description

Stops a local or remote service.

Practical Usage

Use this activity to stop a service and remove the software from memory. Stopping a service prevents users from gaining access to the computer's shared resources. Note that some services might be dependent on other services.

Parameters

Service

Property

Type

Required

Default

Markup

Description

Service Name

Text

Yes

(Empty)

SERVICENAME="Task Scheduler"

The name of the service to stop.

Include devices in the list of services (local connection only)

---

---

---

---

If enabled, indicates that device drivers will be included in the Service name parameter's drop-down list of services. This parameter is disabled by default and is not available if a remote service is specified. This is a design time parameter and therefore includes no markups.

Force-stop dependent services as well

Yes/No

No

No

STOPIFMASTER="YES"

If selected, dependent services will be forced to stop as well. This parameter is disabled by default.

Computer

Property

Type

Required

Default

Markup

Description

Local computer

---

---

---

---

If enabled, indicates that this activity will stop 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 stop 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:

Stop service "Task Scheduler."

NOTE: This example is for the purpose of viewing AML syntax only. Changing the state of a service might yield negative results.

<AMSERVICES ACTIVITY="stop" SERVICE="Task Scheduler" STOPIFMASTER="YES" />