Shut Down Action

Declaration

<AMSHUTDOWN FORCE="yes/no" DELAY="number" MESSAGE="text" COMPUTER="text">

See Also

Shut Down Action-Setting Properties, Lock Workstation Action, Log Off Action, Restart Action

Description

Closes Windows and shuts down the computer. On Windows NT/2000/XP any computer on the network may be specified. Windows 95/98/ME supports shutting down the current machine only.

Practical Usage

Example 1: Administrators could create and deploy a task with this action to force system shutdown at a certain time at night.

Example 2: A task could be built very easily that would shut down the system quickly with just the press of a hot-key combination.

Parameters

General Tab

Force the system to shut-down without notifying applications

Yes/No, Optional - default NO
MARKUP: FORCE="YES"

Specifies that the system should shut down immediately without notifying and waiting for applications to return that they are ready to close.

 

Computer to shut down

Text, Optional - default "localmachinename"
MARKUP: COMPUTER="\\MACHINE3"

Specifies the machine to shut down. This can be any valid machine name on the Windows network. In visual mode a dropdown is provided for convenience in selecting a machine name. If not specified the current machine is assumed. AutoMate must also be running under a user account that has privileges/rights to shut down other machines (such as an administrator account). Due to operating system limitations this parameter is not supported on Windows 95/98/ME systems, on these systems the current machine is assumed.

Prompt user to log off

Yes\No, Optional - NO
MARKUP: PROMPT="YES"

Specifies that Windows should display a dialog to the user with a countdown notifying the user that the system is about to be shut down to give the user time to save his/her work. Due to operating system limitations this parameter is not supported on Windows 95/98/ME systems.

Seconds

Number, Optional - default - 5
MARKUP: DELAY="5"

Specifies the amount of time (in seconds) that windows should display the shut down notification dialog. This parameter is only valid if the "Prompt user to log off" parameter is YES. Due to operating system limitations this parameter is not supported on Windows 95/98/ME systems.

Message to display in the shut down dialog box

Text, Optional - default (none)
MARKUP: MESSAGE="Start to panic now"

Specifies a user-definable message that windows should display the shut down notification dialog. This parameter is only valid if the "Prompt user to log off" parameter is YES. The message will be displayed for the number of seconds specified in the "Seconds" parameter. Due to operating system limitations this parameter is not supported on Windows 95/98/ME systems.

Notes

Custom Description

This action includes the Description tab for entering a custom step description.

More on setting custom step description

Standard Error Handling Options

This action also includes the standard Error Causes and On Error failure handling options/tabs.

More on Error Handling Options

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

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

<AMSHUTDOWN>

<AMSHUTDOWN FORCE="YES" DELAY=5 MESSAGE="Asta la vista, baby!" COMPUTER="MACHINE9">