| 1 | ###Function### |
|---|
| 2 | Shutdown |
|---|
| 3 | |
|---|
| 4 | ###Description### |
|---|
| 5 | Shuts down the system. |
|---|
| 6 | |
|---|
| 7 | ###Syntax### |
|---|
| 8 | Shutdown ( code ) |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | ###Parameters### |
|---|
| 12 | @@ParamTable@@ |
|---|
| 13 | code |
|---|
| 14 | A combination of shutdown codes. See "remarks". |
|---|
| 15 | @@End@@ |
|---|
| 16 | |
|---|
| 17 | ###ReturnValue### |
|---|
| 18 | @@ReturnTable@@ |
|---|
| 19 | Success: 1. |
|---|
| 20 | Failure: 0 and sets the @error flag to Windows API GetLastError(). |
|---|
| 21 | @@End@@ |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | ###Remarks### |
|---|
| 25 | The shutdown code is a combination of the following values: |
|---|
| 26 | $SD_LOGOFF (0) = Logoff |
|---|
| 27 | $SD_SHUTDOWN (1) = Shutdown |
|---|
| 28 | $SD_REBOOT (2) = Reboot |
|---|
| 29 | $SD_FORCE (4) = Force |
|---|
| 30 | $SD_POWERDOWN (8) = Power down |
|---|
| 31 | $SD_FORCEHUNG (16) = Force if hung |
|---|
| 32 | $SD_STANDBY (32) = Standby |
|---|
| 33 | $SD_HIBERNATE (64) = Hibernate |
|---|
| 34 | |
|---|
| 35 | Constants are defined in Constants.au3 |
|---|
| 36 | |
|---|
| 37 | Required values should be <a href="BitOR.htm">BitOR()</a>'ed together. To shutdown and power down, for example, the code would be <a href="BitOR.htm">BitOR</a>($SD_SHUTDOWN, $SD_POWERDOWN). |
|---|
| 38 | |
|---|
| 39 | Standby or Hibernate are ignored if other codes are set. |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | ###Related### |
|---|
| 43 | ProcessClose |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | ###Example### |
|---|
| 47 | @@IncludeExample@@ |
|---|