Windows 10 Logo

There are several different ways you can lock your Windows 10 PC like the Windows key+L keyboard shortcut. If your Windows key is broken but you still want a quick way to lock your PC, create a desktop shortcut.

First, right-click anywhere on the Desktop and a menu will appear. Here, hover your cursor over the “New” option and then select “Shortcut” from the submenu.

Once selected, the “Create Shortcut” window will appear. Here, type or paste the following command in the “Type The Location Of The Item” text box, and then click the “Next” button.

Rundll32.exe user32.dll,LockWorkStation

Note: You can lock your Windows 10 PC using Command Prompt or the Run by using this same command.

Next, give your new shortcut a name. Type in a name that complements its functionality so that you (or anyone else using the PC) will know exactly what it does. Type the name in the box under “Type A Name For This Shortcut.” Once ready, click “Finished.”

The desktop shortcut will now appear on your desktop.

When you want to lock your Windows 10 PC, double-click this desktop icon.


No matter how you decide to lock your PC, it’s always recommended that you do so—even if you’re just stepping away for a minute or two.

Marshall Gunnell
Marshall Gunnell is a writer with experience in the data storage industry. He worked at Synology, and most recently as CMO and technical staff writer at StorageReview. He's currently an API/Software Technical Writer at LINE Corporation in Tokyo, Japan, runs ITEnterpriser, a data-storage and cybersecurity-focused online media, and plays with development, with his RAID calculator being his first public project.
Read Full Bio »

The above article may contain affiliate links, which help support How-To Geek.