Windows Tip: Log Off Your Computer With A Shortcut
Written by Saman Sadeghi on February 22, 2007 Add comments
Lets learn how to log off of your machine with a simple double-click of a button!
Why?!
I know that the Log Off button is tucked neatly inside the Start menu, but we can place shortcut on the desktop or even in the Quick Launch toolbar! Also, I like editing/hacking/customizing stuff!
How To
This trick is very similar to shutting down your computer with a batch file, we just need to change the switch that we pass! More information on the shutdown command and it’s switches.
First, create a batch file with the following commands:
cd\
shutdown -l -f
The “-l” switch tells the computer to log off and the “-f” switch closes all running applications - that’s all you need!
Save the file. I prefer to save my batch files in the Programs Files folder in the c:\ drive. They are program after all!
How To Add An Icon
- Right-click the batch file and click “Create Shortcut“

- Right-click the shortcut and click properties
- Under the “Shortcut” tab, click “Change Icon . . .” This will pop-up the following error:

- After clicking “OK”, a dialog should open displaying all of the icons in the location:
%SystemRoot%\system32\SHELL32.dll - Find one that you like and click “OK”

- You could get nutty and place this shortcut in your Quick Launch folder by typing Windows Key+R, then:
"C:\Documents and Settings\%username%\Application Data\Microsoft\Internet Explorer\Quick Launch"

MMMMM... Related Posts
[...] first little hack I thought would be fun was to create a Windows shortcut so you could log off with a double-click instead of opening the Start menu. I mean, really, who wouldn’t want to save a few tenths of [...]
Would there be a way to switch user (not log off)? I would like to be able to set up a command line to run at a certain time. That way I could limit computer time.
this is such a good fun….. i am able to shutdown my computer by only double click on a short cut….
i m really thanks full to..samanathon.com