It is possible to exit Windows using a command line. You can put this line in a batch file, type it in a DOS window, or enter at the Run line from the Start Menu. The command is:
C:\WINDOWS\RUNDLL32.EXE user.exe,ExitWindows
Windows 98/ME users can use the more advanced SHExitWindowsEx:
RUNDLL32.EXE shell32,SHExitWindowsEx n
where n is one, or a combination of, the following numbers:
0 - LOGOFF:
Shuts down all running processes, then logs the user off.
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.
2 - REBOOT:
Shuts down the system and then restarts the system.
4 - 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.
8 - POWEROFF:
Shuts down the system and turns off the power. The system must support the power-off
feature.
To combine actions, add the values.
Another option is to download a little program that I wrote.
Winexit - A small little program. Nothing fancy, just gives you the option to logoff, shutdown or restart your computer. The exe is a total of 28 KB in size, Windows XP manifest file included to give it that XP look for systems running XP. Just extract to any folder and run. Remembers your last choice. Wrote it 'cause I like having an icon right on my desktop to shutdown the PC without having to go through the start menu. Saw others asking for the same thing so decided to post it here.