PDA

View Full Version : Windows - shutdown now


jbslow
08-12-01, 07:14 PM
Origanally quoted by "dozier786" edited and forwarded to me by "Maestro"

C:\WINDOWS\RUNDLL32.exe SHELL32.DLL,SHExitWindowsEx n or
C:\WINDOWS\RUNDLL.exe SHELL32.DLL,SHExitWindowsEx

Where n is one of the following values depending on the task you want to accomplish:

n=0 LOGOFF: Shuts down all running processes, logs the user off then restarts the Windows shell. (same as Loggoff from the Start Menu)

n=1 SHUTDOWN: Shuts down the system to a point at which it is safe to turn off the power. All file buffers have been flushed to disk and all running processes have stopped.

n=2 REBOOT: Shuts down the system then restarts it. (same as Start Menu | Shutdown | Restart)

n=4 FORCE: Forces all processes to terminate - in effect, shuts down all running programs. When this flag is set, Windows does not query running applications to inform that Windows is shutting down. This can the applications to lose data, therefore, you should only use this flag in an emergency.

n=8 POWEROFF: Exits Windows, then turns off the computers power(provided the computer supports the power-off feature).

n=-1 RESTART EXPLORER: Quickly closes Explorer (i.e., the Windows desktop) then lets it restore itself. You may also add functions to acomplish various other tasks like 1+4=5(shutdown+force=shutdown and terminates all applications without prompt. So on and so forth)