How to shutdown your computer from a desktop icon. Note: This procedure does not work with Windows NT or 95.
Step 1. Right-click on your desktop for context window and select New; then click on Shortcut.
Step 2. Type the following line in the Command line space:
To Shut Down:
C:\WINDOWS\RUNDLL32.EXE shell32,SHExitWindowsEx 1
To Log Off:
C:\WINDOWS\RUNDLL32.EXE shell32,SHExitWindowsEx 0
C:\WINDOWS\RUNDLL32.EXE shell32,SHExitWindowsEx 2
Note: two spaces in the command lines: The first between EXE and shell32, and the second between Ex and the numeral.
Step 3. Click on Next and type Shutdown, in place of Rundll.
Step 4. Click on Finish and an Icon will appear on the desktop labeled Shutdown.
Step 5. Double click on this Icon to shutdown your computer.