Shutting Down/Restarting Windows
Windows Only (Windows Only)

(Originally posted on the MetaCard list - Editor)

Thanks to Scott and xbury.cs I've been able to do it with commands found on the web page which xbury.cs provided.

http://www.aumha.org/a/shtrstrt.php
Below is a paraphrase of the important stuff copied from the site (see the above site for details):

For Windows 95

TO RESTART: get shell("c:\windows\rundll.exe user.exe,exitwindowsexec")
TO SHUTDOWN: get shell("c:\windows\rundll32.exe user,exitwindows")
For Windows 98/ME
TO LOGOFF: get shell("c:\windows\rundll32 shell32.dll,SHExitWindowsEx 0")
TO SHUTDOWN: get shell("c:\windows\rundll32 shell32.dll,SHExitWindowsEx 1")
TO RESTART: get shell("c:\windows\rundll32 shell32.dll,SHExitWindowsEx 2")
TO FORCE SHUTDOWN: get shell("c:\windows\rundll32 shell32.dll,SHExitWindowsEx 4")
TO POWEROFF: get shell("c:\windows\rundll32 shell32.dll,SHExitWindowsEx 8")
TO RESTART EXPLORER: get shell("c:\windows\rundll32 shell32.dll,SHExitWindowsEx -1")
Note: These are additive to allow you to do more than one at once. See the web site for more details.

For Windows 2000/XP

TO RESTART WINDOWS: get shell("shutdown -r -t 01")
TO SHUTDOWN WINDOWS: get shell("shutdown -s -t 01")
TO POWEROFF: get shell("c:\windows\system32\tsshutdn.exe 0 /DELAY:0 /POWERDOWN")

Posted 2/13/2003 by Thomas McCarthy to the MetaCard List   (See the complete post/thread)