Batch file to lock the screen of your PC. Tested on Windows XP, Vista and 7. Works!
@echo off
%windir%\System32\rundll32.exe user32.dll,LockWorkStation
exitOr
Right click an empty area of your desktop, choose New/Shortcut and enter this line as the command line:
rundll32.exe user32.dll, LockWorkStation
Or
Windows + L