Clicky

How to Shutdown your computer from a Desktop Icon

Shutting Down with an Icon

Today we’re going to learn how to Shutdown your computer from a desktop icon.

We’ll be outlining the steps needed to create an Icon, then setup command-line commands to either:

  • Shutdown
  • Logoff
  • or Restart

We’ll be using Rundll32.exe for this along with commands for the listed items above.

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

To Restart:

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.