Ticket #2579: Shutdown.txt

File Shutdown.txt, 1023 bytes (added by mlipok, 11 years ago)
Line 
1###Function###
2Shutdown
3
4###Description###
5Shuts down the system.
6
7###Syntax###
8Shutdown ( code )
9
10
11###Parameters###
12@@ParamTable@@
13code
14        A combination of shutdown codes.  See "remarks".
15@@End@@
16
17###ReturnValue###
18@@ReturnTable@@
19Success:        1.
20Failure:        0 and sets the @error flag to Windows API GetLastError().
21@@End@@
22
23
24###Remarks###
25The 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
35Constants are defined in Constants.au3
36
37Required 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
39Standby or Hibernate are ignored if other codes are set.
40
41
42###Related###
43ProcessClose
44
45
46###Example###
47@@IncludeExample@@