Computer Hope
Microsoft => Microsoft Windows => Windows XP => Topic started by: Sebastian42 on July 10, 2010, 02:14:53 AM
-
I KNOW that "rundll32.exe shell32.dll,SHExitWindowsEx 1" can be used in a
batchfile to close WinMe; what line would RESTART rather than CLOSE WinMe ?
-
rundll32.exe shell32.dll,SHExitWindowsEx flag
where flag is one, or a combination of, the following numbers:
0 - LOGOFF
1 - SHUTDOWN
2 - REBOOT
4 - FORCE
8 - POWEROFF
These values can be added. Example: reboot = 2 and force = 4 so a forced reboot = 6
NOTE: Using the FORCE option can cause programs to lose data.
LOGOFF - Shuts down all running processes, then logs the user off.
POWEROFF - Shuts down the system and turns off the power. The system must support the power-off feature.
REBOOT - Shuts down the system and then restarts the system.
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.
FORCE - Forces processes to terminate. When this flag is set, Windows does not query running applications to inform them that Windows is shutting down. This can cause the applications to lose data, therefore, you should only use this flag in an emergency.
-
Thank you.