Execute these commands at a DOS prompt or use the ShellExecute API function to execute them.
Win32 shutdown:
C:\Windows\RunDll.exe C:\Windows\System\User.exe,exitWindows
Win32 restart:
C:\Windows\RunDll.exe C:\Windows\System\User.exe,exitWindowsExec
WinXP shutdown:
Shutdown -s -t 01
WinXP restart:
Shutdown -r -t 01
Thanks to Ariel Canievsky.
|