Shutdown

From AutoIt Wiki

Jump to: navigation, search

Shuts down the system. Adapted from AutoIt docs.

Contents

Syntax

Shutdown(flag)

Parameters

flagShutdown instruction flag.

Flag

The shutdown flag parameter may be used as a combination of the following options:

0  =  Logoff
1  =  Shutdown
2  =  Reboot
4  =  Force
8  =  Power down
32 =  Standby
64 =  Hibernate

Such that if you wanted to shutdown and power down then the flag would be set to

shutdown + power down = 1 + 8 = 9.

Return Value

Success: Returns 1.
Failure: Returns 0.

Example

Shutdown(6) ; force reboot

Related Functions

ProcessClose

Personal tools