Computer - Restart

Declaration

<AMCOMPUTER ACTIVITY="restart" COMPUTER="text" PROMPT="YES/NO" DELAY="number" MEASURE="text (options)" MESSAGE="text" FORCE="YES/NO" />

Related Topics   

Overview

Restarts the computer.

Practical usage

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

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

Parameters

General

Property Type Required Default Markup Description
Local computer --- --- --- --- If enabled, indicates that the local computer is restarted (enabled by default). This is a visual mode parameter only used during design time, thus, it 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. Automate Desktop 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 selected, specifies that a shutdown dialog is displayed with a countdown notifying the user that the system is about to restart in order to provide time to save their 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 delays before shutting down. This parameter is active only if the Prompt user to log off parameter is selected.

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 corresponds 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 Text No (Empty) MESSAGE="System is now shutting down."

A user-defined message to be displayed by the shutdown dialog. This parameter is active only if the Prompt user to log off parameter is selected. The message is 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 selected, specifies that the system shuts down immediately without notifying and waiting for applications reply that they are ready to close. This parameter is disabled by default.

Description

Error Causes

On Error

Examples

NOTE:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.

Example 1

The folliowing sample task restarts a remote computer:

Copy
<AMCOMPUTER ACTIVITY="restart" COMPUTER="COMPUTERNAME" PROMPT="yes" DELAY="6" MEASURE="minutes" MESSAGE="This computer will shut down soon" FORCE="yes" />

Example 2

The following sample task restarts the local computer:

Copy
<AMCOMPUTER ACTIVITY="restart" />