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"

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.
Use this:
@ECHO OFFCOLOR f0
TITLE Locker
ECHO Locking computer...
rundll32.exe User32.dll,LockWorkStation
EXIT
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
hey i found out one. do the exact same thing but instead of “cd\
shutdown -l -f”
do “cd\
shutdown -s -f -t 60 -c “what you want to say” ” then it will shutdown in 60 seconds. you can change 60 to however many seconds you want it to take to shutdown.
If you want to be really minimalistic, drop a shortcut to rundll32.exe on your desktop and then edit it to add the User32.dll,LockWorkStation as a parameter.