It is an API of Windows called ExitWindowsEx, containing these calls:
internal const int EWX_LOGOFF = 0x00000000;
internal const int EWX_SHUTDOWN = 0x00000001;
internal const int EWX_REBOOT = 0x00000002;
internal const int EWX_FORCE = 0x00000004;
internal const int EWX_POWEROFF = 0x00000008;
internal const int EWX_FORCEIFHUNG = 0x00000010;
and sourced from Shell32.dll.
The process can be called at the comand line by using shutdown.exe.
[tt]
SHUTDOWN [options] [-m [\\ComputerName]]
options
-M \\Computer : A remote computer to shutdown.
-L : logoff current user
-c "Msg" : An optional shutdown message
-S : Shutdown
-R : Shutdown and reboot
-A : Abort a system shutdown during the timeout period.
-T:xx : Set the timer for system shutdown in seconds.[20 sec. default]
-F : Force running applications to close.
-d u:xx:yy : List a USER reason code for the shutdown.
-d P:xx:yy : List a PLANNED reason code for the shutdown.
xx Specifies the major reason code (0-255)
yy Specifies the minor reason code (0-65536)
[/tt]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.