The Best Tech Newsletter Anywhere

Join 250,000 subscribers and get a daily digest of news, geek trivia, and our feature articles.

How to Create a Desktop Shortcut for Locking Your Windows 10 PC

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.

New shortcut from right-click menu on desktop

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

Command for creating a lock shortcut

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.”

Name the desktop shortcut

The desktop shortcut will now appear on your desktop.

Lock PC icon

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
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.
Read Full Bio »

The above article may contain affiliate links, which help support How-To Geek.
How-To Geek is where you turn when you want experts to explain technology. Since we launched in 2006, our articles have been read more than 1 billion times. Want to know more?


The Best Tech Newsletter Anywhere

Join 250,000 subscribers and get a daily digest of news, comics, trivia, reviews, and more.