Processes - End |
<AMPROCESSES ACTIVITY="end" DOMAINNAME="text" REMOTEMACHINE="text" USERNAME="text" PASSWORD="text (encrypted)" PROCESSNAME="text" /> |
Description:
Forcibly ends the running instance of a process.
NOTE: Any data entered or any changes made in the program that has not been saved will be lost. Where possible, it is better to use the Close Window action because it notifies the application before actually shutting it down, thus giving the application time to "clean up". |
Used to force a process (usually a program or .EXE file) to shut down. Although using the Close Window activity will gracefully close the application, at times this activity is preferable if the target process is frozen, not responding or unable to be shut down any other way (as is the case with certain applications that run in the task-bar).
Process
Property |
Type |
Required |
Default |
Markup |
Description |
Find by name |
Text |
No |
(Empty) |
|
If enabled, specifies the name of the process to terminate. This parameter supports the absolute (full) path or relative (file name only) path of the process. If this parameter is enabled, the Find by Process ID parameter becomes inactive. This parameter is enabled by default. |
If multiple instances of the process exists, terminate |
Text (options) |
No |
Oldest |
|
Indicates which process instance should be terminated incase more than one instance of a given process is running. The available options are:
|
Find by process ID |
Number |
No |
Yes |
PROCESSID="11452" |
If enabled, specifies the process ID of the executable to terminate. If this parameter is enabled, the Find by name parameter becomes inactive. This parameter is disabled by default. Note: Use the Processes - Get Information activity to retrieve the process ID of a given process. |
Send a "Close" message prior to terminating process |
Yes/No |
No |
No |
CLOSEMESSAGE="NO" |
If set to YES, an attempt to close the process gracefully will be performed before terminating it forcibly. If set to NO, the application will be forcibly terminated immediately. Note: If this parameter is set to NO, the process will not have opportunity to clean up any system resources it was using before it ends. |
Computer
Property |
Type |
Required |
Default |
Markup |
Description |
Local computer |
|
|
|
|
If enabled, specifies that the process to end resides on the local machine. 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, specifies that the process to end resides on a remote machine. 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) |
|
The host name or IP address of the remote machine that contains the process to end. This parameter is available only if the Another computer parameter is enabled. |
Domain |
Text |
Yes |
(Empty) |
DOMAINNAME="netauto" |
The domain name of the remote machine that contains the process to end. This parameter is available only if the Another computer parameter is enabled. |
Username |
Text |
Yes |
(Empty) |
USERNAME="Bruce.Wayne" |
A valid username used to log onto the remote machine that contains the process to end. This parameter is available only if the Another computer parameter is enabled. |
Password |
Text |
Yes |
(Empty) |
PASSWORD="batman" |
The password corresponding to the username entered in the Username field. This parameter is available only if the Another computer parameter is enabled. |
NOTE: The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder. |
Sample 1: End process Notepad.exe.
<AMENDPROCESS PROCESS="Notepad.exe" /> |
Sample 2: End all instances of Internet Explorer process.
<AMENDPROCESS PROCESS="C:\Program Files (x86)\Internet Explorer\iexplore.exe" SAMEPROCESS="all" /> |