Shutdown Action Icon

Shut Down

Declaration

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

See Also

Lock Workstation | Log Off | Restart | Shut Down | Suspend/Hibernate | Empty Recycle Bin | End Process | Change Printer | Print | Set Date and Time | Run | Block Input | Generate Password

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 Properties

Property

Type

Req'd

Default

Markup

Description

Shut down local machine

 

 

 

 

If enabled, specifies that the local machine will be shut down. If the Shut down a remote computer parameter is enabled, this parameter is ignored.  This is a visual mode parameter only used during design time, thus, contains no markup. It is enabled by default.

Shut down a remote computer

 

 

 

 

If enabled, specifies that a remote computer will be restarted. If the Shut down local machine parameter is selected, this parameter is ignored. This is a visual mode parameter only used during design time, thus, contains no markup. It is disabled by default.

Computer to shut down

Text

Yes

(Empty)

COMPUTER="COMPUTERNAME"

The computer name to shut down. This can be any valid computer name on the Windows network. In visual mode a drop-down 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). This parameter is active only if the Shut down a remote computer parameter is selected.

Prompt user to log off

Yes/No

No

No

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. This will give the user time to save his/her work. Active only if the Shut down a remote computer parameter is selected.

NOTE: Due to operating system limitations this parameter is not supported on Windows 95/98/ME systems.

Shutdown after

Number

No

5

DELAY="6"

The amount of time that Windows should display the shut down notification dialog. This parameter is active only if the Prompt user to log off parameter is set to YES.

NOTE: Due to operating system limitations this parameter is not supported on Windows 95/98/ME systems.

Measure

Text (options)

No

seconds

MEASURE="minutes"

Specifies the time measure that should be used in combination with the value entered in the Shutdown after parameter. This parameter is active only if the Prompt user to log off parameter is set to YES. The available options are:

  • Milliseconds

  • Seconds (default)

  • Minutes

  • Hours

Message to display in the shut down dialog box

Text

No

(Empty)

MESSAGE="Please begin to panic now"

A user-defined message that windows should display on the shut down notification dialog. This parameter is active only if the Prompt user to log off parameter is set to YES. The message will be displayed for the number of seconds, minutes or hours specified in the Shutdown after  parameter.

NOTE: Due to operating system limitations this parameter is not supported on Windows 95/98/ME systems.

Force the system to shut-down without notifying applications

Yes/No

No

No

FORCE="YES"

If set to YES, specifies that the system should shut down immediately without notifying and waiting for applications to return that they are ready to close. This parameter is set to NO by default.

Description Properties

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 Properties

The Error Causes tab properties lets you instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More on Error Causes properties

On Error Properties

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

Additional Notes

Expressions, Variables & Functions

A percent sign is used as a special character in AutoMate to indicate the beginning and end of an expression. This allows variables, functions and other expressions to be entered in any text parameter of a task's properties. For example: %1+1% inside a task will resolve to 2 at runtime. A more elaborate example is %FileDateTime(myFile)% which results to the date/time of myFile. To help construct expressions, you can open Expression Builder by clicking the Insert Expression (%) button or by pressing F2.

More on expressions

More on variables

More on functions

More on extended functions
More on the expression builder

Example

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

 

Example 1 - Shut down a remote computer.

 

<AMSHUTDOWN FORCE="YES" PROMPT="YES" DELAY="5" MEASURE="minutes" MESSAGE="Save all your work immediately." COMPUTER="COMPUTER1" />

 

 

Example 2 - Shut down the local machine.

 

<AMSHUTDOWN FORCE="YES" />

 

↑ Top of Page