Computer - Shut down
Declaration
<AMSHUTDOWN FORCE="yes/no" DELAY="number" MESSAGE="text" COMPUTER="text">
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.
General Parameters
Property |
Type |
Required |
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. 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:
|
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 tab - A custom description can be provided on the Description tab to convey additional information or share special notes about a task step.
Error Causes tab - Specify how this step should behave upon the occurrence of an error. (Refer to Task Builder > Error Causes Tab for details.)
On Error tab - Specify what AWE should do if this step encounters an error as defined on the Error Causes tab. (Refer to Task Builder > On Error Tab for details.)
Examples
The sample AML code below can be copied and pasted directly into the Steps panel 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" />