Computer - Restart

Declaration

<AMCOMPUTER ACTIVITY="restart" COMPUTER="text" PROMPT="yes" 
MEASURE="minutes" MESSAGE="text" FORCE="yes" />

Description: Restarts the computer.

Practical Usage

Example 1: Administrators could create and deploy a task with this activity to force the system to restart after an automated installation or file update has taken place.

Example 2: After modifications are made to the registry using the Registry activity, the system could be restarted to allow the changes to take effect on the system.

General Parameters

Property

Type

Required

Default

Markup

Description

Local computer

 

 

 

 

If enabled, indicates that the local computer will be restarted (enabled by default). This is a visual mode parameter only used during design time, thus, contains no markups. It is enabled by default. If this parameter is enabled, the Remote computer parameter is ignored.

Remote computer

Text

Yes

(Empty)

COMPUTER="COMPUTERNAME"

If enabled, specifies the name of the remote computer to restart. This can be any valid computer name or corresponding IP address on the Windows network. must also be running under a user account that has privileges/rights to restart other machines (such as an administrator account). If this parameter is enabled, the Local computer parameter is ignored.

Prompt user to log off

Yes/No

No

No

PROMPT="YES"

If set to YES, specifies that a shutdown dialog box should be displayed with a countdown notifying the user that the system is about to restart to provide time to save his/her work. This parameter is active only if the Remote computer parameter is enabled.

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 total amount of time that Windows should delay before shutting down. 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 measurement that should correspond with the numeric value entered under the Shutdown after parameter. The available options are:

  • Milliseconds - The value specified in the Shutdown after parameter is measured in milliseconds.

  • Seconds (default) - The value specified in the Shutdown after parameter is measured in seconds.

  • Minutes - The value specified in the Shutdown after parameter is measured in minutes.

  • Hours  - The value specified in the Shutdown after parameter is measured in hours.

Message to display in the shut down dialog box

Text

No

(Empty)

MESSAGE="Please begin to panic now"

A user-defined message to be displayed by the shutdown dialog box. 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 will shut down immediately without notifying and waiting for applications reply 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.

Sample 1 - Restart a remote computer

<AMRESTART FORCE="YES" PROMPT="YES" DELAY="6" MEASURE="minutes" 
MESSAGE="This computer will shut down soon." COMPUTER="COMPUTERNAME" />

Sample 2  - Restart the local computer

<AMRESTART />