TechBuzzPro

How to Lock a Windows Computer Shortcut

· 5 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

There is no native "lock" button for individual desktop shortcuts in Windows. Attempting to force this via standard file properties often breaks the link or causes permission errors. The most reliable, practical method to achieve this goal is to create a shortcut that requires a password to execute. This effectively locks the target application or file behind an authentication gate, ensuring only authorized users can open it.

What You'll Need

  • A Windows PC running Windows 10 or 11.
  • Administrator privileges on the computer.
  • The target application or file you wish to protect.
  • A third-party utility like "ShortCut Lock" (free/open source) OR the built-in Windows Task Scheduler method (native, no downloads required).

Note: We will focus on the native Windows Task Scheduler method as it requires no external software and is fully supported by Microsoft. It creates a scheduled task that launches your program but prompts for credentials before execution.

Step-by-Step

  1. Create the Target Shortcut: First, ensure you have a working shortcut to the application or file you want to lock. Right-click the application icon on your desktop or start menu, select Send to, and then Desktop (create shortcut). Note the exact path of this shortcut or the original executable file.
  2. Open Task Scheduler: Press the Windows Key + R to open the Run dialog. Type taskschd.msc and press Enter. This opens the Task Scheduler management console.
  3. Create a New Task: In the right-hand Actions pane, click Create Task... (not "Create Basic Task"). This gives us access to the necessary security settings.
  4. Name the Task: In the General tab, enter a descriptive name in the Name field (e.g., "Locked Calculator"). Check the box that says Run whether user is logged on or not. Crucially, check Run with highest privileges if the app requires admin rights; otherwise, leave it unchecked to avoid unnecessary elevation prompts.
  5. Configure the Trigger: Go to the Triggers tab and click New.... Leave the default setting (Start at log on) or choose At startup depending on your preference. Click OK.
  6. Add the Action: Navigate to the Actions tab and click New.... Set the action to Start a program. In the Program/script box, browse to and select the original .exe file of the application you want to lock (or the shortcut path if preferred, though the .exe is more stable). Click OK.
  7. Set Conditions and Settings: Go to the Conditions tab. Uncheck Start the task only if the computer is on AC power if you are on a laptop and want it to work on battery. Go to the Settings tab and ensure Allow task to be run on demand is checked. Click OK to save the task.
  8. Create the Launcher Shortcut: Now, create a new shortcut on your desktop that will trigger this task. Right-click on the desktop, select New > Shortcut. In the location field, type the following command exactly:
    C:\Windows\System32\schtasks.exe /run /tn "YourTaskNameHere"
    Replace YourTaskNameHere with the exact name you gave the task in Step 4. For example: /tn "Locked Calculator". Click Next, name the shortcut (e.g., "Launch Locked App"), and click Finish.
  9. Test the Lock: Double-click your new launcher shortcut. Windows should now prompt you for a username and password. Enter your current Windows account credentials. If correct, the application will launch. If incorrect, it will fail, effectively locking the app.

Common Mistakes

  • Using the Wrong Path: When creating the shortcut in Step 8, ensure you use the full path to schtasks.exe. Using just schtasks may fail depending on system environment variables.
  • Incorrect Task Name: The name in the /tn parameter must match the task name in Task Scheduler exactly, including spaces. If your task is named "My App", do not write "MyApp".
  • Ignoring Permissions: If the application requires Administrator rights, failing to check Run with highest privileges in Step 4 may cause the app to crash or fail to load resources upon launch.
  • Assuming Password Change Updates the Lock: This method uses your *current* Windows login password. If you change your Windows password later, the shortcut will still ask for the old password until you update the credential store or re-authenticate.

Tips

  • Hide the Original Icon: Once your locked shortcut is working, delete the original application shortcut from your desktop to prevent users from bypassing the lock by opening the unsecured version directly.
  • Change the Icon: Right-click the new launcher shortcut, go to Properties > Change Icon, and assign an icon that looks distinct or warning-like to discourage casual clicking.
  • Use Group Policy for Multiple Users: If you are managing a business PC, consider using Group Policy Preferences to deploy these tasks rather than doing them manually for each user.
  • Combine with BitLocker: For maximum security, ensure your entire drive is encrypted with BitLocker. This prevents physical access attacks even if the shortcut lock is bypassed via technical means.

Troubleshooting

If the shortcut does not launch the application or fails immediately, follow these steps:

  1. Check Task Status: Open Task Scheduler again. Find your task in the list. Ensure the status is Ready. If it shows Disabled, right-click and select Enable.
  2. Verify Credentials: Ensure you are entering the correct Windows username and password. If you use a Microsoft Account email, try using just the local username part.
  3. Run Manually: In Task Scheduler, right-click your task and select Run. If this works, the issue is with the shortcut syntax. If this fails, check the Last Result column for error codes (e.g., 0x1 indicates insufficient privileges).
  4. Check Compatibility: Some modern apps (like UWP/Store apps) cannot be launched via schtasks in the same way as traditional Win32 executables. This method works best for standard .exe applications installed locally.

Frequently Asked Questions

Can I lock a folder instead of an app?

This specific method is designed for launching programs. To lock folders, you should use built-in Windows features like Encrypting File System (EFS) via file properties, or third-party folder locker software.

Does this work on Windows 11?

Yes. The Task Scheduler interface and schtasks command line tool function identically in Windows 10 and Windows 11.

Can someone bypass this by editing the shortcut?

Technically, yes, if they have administrator access to edit the shortcut text. However, for general household use, it prevents accidental or unauthorized opening by children or guests.

Why does it ask for a password every time?

Because it is executing under a different security context or requiring explicit authentication to launch the privileged process. This is the intended security mechanism.

Is there a way to make it remember the password?

No, not safely within this method. Storing passwords in plain text defeats the purpose of locking. If you want seamless access, remove the lock.