End Process

Forcibly ends the running instance of the process specified. Any data entered or any changes made in the program that have not been saved, will be lost. Used to force a process (usually a program file or EXE) to shut down. This action can be used 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).

Declaration

<AMENDPROCESS FILE="text" SAMEPROCESS="text [options]">

Example 1 - End process Notepad.exe.

<AMENDPROCESS PROCESS="Notepad.exe" />

Example 2 - End all instances of Internet Explorer process.

<AMENDPROCESS PROCESS="C:\Program Files (x86)\Internet Explorer\iexplore.exe" SAMEPROCESS="all" />

See Also

Change Printer, Empty Recycle Bin, Get Process Information, Get Volume Information, Log Event, Print, Registry, Run, Set Date and Time

General Tab

Property

Type

Required

Default

Markup

Description

Use process name

Text

No

(Empty)

a)PROCESS="NOTEPAD.EXE"

b)PROCESS="C:\WINNT\system32\NOTEPAD.EXE"

If enabled, specifies the name of the executable to terminate. It may be specified with or without the path. If this parameter is enabled, the Use process ID parameter is ignored. This parameter is enabled by default.

Use process ID

Text (options)

No

Upper Case

PROCESSID="11452"

If enabled, specifies the process ID of the executable to terminate. If this parameter is enabled, the Use process name parameter is ignored.

Try to send a close message to the application first

Yes/No

No

Yes

CLOSEMESSAGE="NO"

If set to YES (default), a close message will be sent to the application before termination. If set to NO, the application will be terminated immediately.

If more than one matching process found then

Text (options)

No

(Empty)

RESULTVARIABLE="varname"

If more than one matching process is found at runtime, specifies what action to take. The available options are:

  • Terminate oldest process (default)

  • Terminate newest process

  • Do not do anything

  • End all matching processes

Description Tab

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Tab

The Error Causes tab allows you to select/omit specific errors that should cause a particular step to fail.

More on Error Causes properties

On Error Tab

The On Error tab allows you to determine what the task should do if a particular step encounters an error.

More about On Error properties

Provided List of running processes

When in visual mode, a list of running process is displayed by clicking the arrow on the dropdown box in the Filename parameter. This is to assist in selecting a valid process.

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