Services - Stop

Declaration

<AMSERVICES ACTIVITY="stop" SERVICE="text" REMOTEMACHINE="text" REMOTEDOMAIN="text" REMOTEUSERNAME="text" REMOTEPASSWORD="text (encrypted)" 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: 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.
NOTE: This parameter does not contain markup and is only displayed in visual mode for task construction and configuration purposes.
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 be performed on a service located on the local computer. This parameter is enabled by default. If this parameter is selected, the Another computer parameter becomes inactive.
NOTE: This parameter does not contain markup and is only displayed in visual mode for task construction and configuration purposes.
Another computer --- --- --- --- If enabled, indicates that this activity will be performed on a service located on a remote computer. The parameters below become active if this parameter is enabled.
NOTE: This parameter does not contain markup and is only displayed in visual mode for task construction and configuration purposes.
Computer Text Yes, if set to Another computer (Empty) REMOTEMACHINE="MachineName" The computer name of the remote machine in which to connect to.
Domain Text Yes, if set to Another computer (Empty) REMOTEDOMAIN="DomainName" The domain that the remote machine belongs to.
Username Text Yes, if set to Another computer (Empty) REMOTEUSERNAME="Username" The username to use to sign in to the remote machine. This user must have the appropriate permissions to modify services on the remote machine.
Password Text Yes, if set to Another computer (Empty) REMOTEPASSWORD="password" The password to use to authenticate with the Username parameter.

Description

Error Causes

On Error

Example

NOTE:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.

Description

This sample task stops the Task Scheduler service.

NOTE: This example is for the purpose of viewing AML syntax only. Changing the state of a service might yield negative results.
Copy
<AMSERVICES ACTIVITY="stop" SERVICE="Task Scheduler" STOPIFMASTER="YES" />