How To Create A Shortcut To Lock Your Computer In Windows 7/Vista

I have to lock my computer every time I need to go somewhere, since going to Start > Arrow >Lock takes a lot of time, I have made a desktop shortcut for it to make things easy. Here is how you can make one too.

Right-click anywhere on your desktop, select New > Shortcut. Here type,

rundll32.exe user32.dll,LockWorkStation

just like it’s shown in the screenshot below.

createshortcut How To Create A Shortcut To Lock Your Computer In Windows 7/VistaView in gallery

In the next step name this shortcut, for e.g, Lock Computer.

lockcomputer How To Create A Shortcut To Lock Your Computer In Windows 7/VistaView in gallery

Click Finish and you are done. Now next time you want to lock your computer, simply click this shortcut. That’s all. Enjoy!

Note: If you have a Windows keyboard you can press Windows Key + L to lock instantly. Thanks to Scott for pointing this out in the comments.

  • Scott

    It’s called WindowsKey-L.

    • Oh yea we know what’s it called. But what about those who are newbies? If I write Windows Key-L those who are new to Vista will keep finding it all day long.

      Anyways thanks for taking your time to leave a comment. Fixed for you 😉

  • Scott

    Just pointing out that it’s way more work to create a shortcut and have to click it than to just tell people the built-in key combination of Windows-key + L does it already. And if those people can’t figure out where the windows key is on their keyboards, they surely cannot create a shortcut.

    • Agreed. 😉

      I have added this in the last line of the post!

    • Sam

       i use it all the time. I have set the computer to login automatically when the it boots, then I have added LOCK SHORTCUT to STARTUP folder.

      this way i can start the pc & go do some other stuff, when I am back it is fully loaded & locked. Just unlock & start working.