Top Nav

Windows 7: Create a Shortcut to Lock Your Computer

If you want to lock your Windows workstation there are a couple of different key combinations you can use. You can also create a shortcut and pin it on the Windows 7 Taskbar.

First right click the Desktop and select New >> Shortcut.


In the Create Shortcut window type: Rundll32.exe User32.dll,LockWorkStation. Click Next.

Give the shortcut a name like Lock Computer and click Finish.


The Lock Computer icon appears on the Desktop. Right click on it and select Properties.


In the Properties window select the Shortcut tab. Click Change Icon.


Now type: C:\Windows\System32\imageres.dll into the Look for Icons in This File field. Select the icon you want to use for the shortcut and click OK.


Set the Run dropdown menu to Minimized, then click OK.


Then drag the Lock Computer icon you just created to the Taskbar and pin it.


Now you can click the icon to lock your computer.



If you’re a keyboard master, use [Ctrl][Alt][Delete] then select Lock Computer. Or you can use [Windows Key][L].

More Reading:


6 Responses to Windows 7: Create a Shortcut to Lock Your Computer

  1. Rajesh December 9, 2011 at 1:22 pm #

    like it !!!

  2. Austin Krause December 9, 2011 at 2:25 pm #

    I always use Windows Key + L, but this is very nice for touch-screens – especially if it works with Windows 8!

    • KG December 11, 2011 at 2:42 am #

      Wouldn’t the Control-Alt-Delete combo work? I guess it is an extra step, but it seems to work for me every time….

    • Noah June 17, 2013 at 3:05 pm #

      Yes! I don’t even know why they made this article. Windows Key+L is built in!

      • James Perkins January 5, 2016 at 10:27 am #

        I found this useful. I use my Ubuntu workstation mouse and keyboard provide most of the input to my Windows 7 notebook via the Synergy app, and avoid touching the notebook keyboard most of the time.

        Since the remote computer keyboard is not a keyboard master, the WindowsKey + L method is not honored. I have set my shortcut key combination to Ctrl + Alt + L, which is the same as Ubuntu.

        I still have to touch the noteboook keyboard to enter Ctrl + Alt + Del and password, but that’s all I need it for.

  3. Ritesh July 27, 2016 at 8:25 pm #

    awesome !!! this is very userful. Thank you

Leave a Reply