How To Lock A Windows PC Without Logging Off

How To Lock A Windows PC Without Locking The ScreenHow To Lock A Windows PC Without Locking The Screen

Key Points

  • Locking the PC won’t log you off. It will simply lock the PC and you will be able to continue from where you left off.
  • To lock the PC instantly, use the Windows key + L keyboard shortcut keys.
  • To lock the PC without turning off the screen, you can use KeyFreeze which disables the keyboard and mouse.

If you are using an account with a password, you will be required to sign in using the password each time you manually lock your computer. However, if you lock your account, you won’t be logged off – these are two separate things.

When you log out of your computer account, your account becomes dormant, and all applications and processes within stop running. However, if you only lock your account, the apps will continue to perform their tasks, the processes will keep running, the updates will continue to download and install, etc. No tasks will be stopped.

This is usually the requirement of most Windows users. There are multiple ways to lock your Windows computer which include locking the screen from the keyboard, locking the screen with a single click, etc. This post discusses the methods to manually, and automatically lock your computer.

Why locking the computer is important

When you leave your computer running and are away from it, it is best practice to turn it off or at least lock it. Locking the computer restricts unauthorized access to it. It keeps your personal data and other things on the computer safe from intrusion.

If you left your computer unlocked and unattended, it would be the equivalent of surrendering your device and its contents to unknown personnel. They would have complete access to your files, folders, applications, and browser activity and do with it as they want.

Therefore, whether you are away for a few seconds or hours, you must always lock your computer screen. When the computer is locked, the person would need a valid password to gain access to your account.

Quickly lock the computer using the keyboard

The quickest method to lock the computer is using the keyboard. This way, your account is locked, and also, you are not logged out. This means that your apps and processes keep running in the background.

To quickly lock your computer account, you can use the Windows Key + L shortcut keys from the keyboard. Hold down the Windows key and then press the “L” key. This will lock the computer.

Note that if you have configured a PIN or password on your account, you will need to use it to sign back into your account.

Lock the Windows PC from Start button

Another method to lock the Windows computer without logging off is from the Start menu button in the taskbar. This way, you can lock your computer in just 3 clicks and do not have to use the keyboard at all.

To lock the screen from the Start menu, click on the Start button, then click on your Account name, and then click Lock.

Lock Windows computer from Start menu
Lock Windows computer from Start menu

After performing these simple clicks, your account will be locked instantly. However, to log back in, if a password is configured on your account, you will need to enter it to log back in.

Lock the Windows PC from Security Options window (CTRL + ALT + DEL)

Another method to lock your Windows computer is from the Security Options window, which is also known as the “CTRL + Alt + Delete” screen. This screen simultaneously appears when you press the CTRL, ALT, and Delete keys on the keyboard.

Security Options window
Security Options window

As you can see from the image above, you can also lock your computer from the Security Options window. After pressing the CTRL + ALT + DEL shortcut keys, click the Lock button, and your screen should lock instantly.

Lock the Windows screen from command line

On a Windows PC, you can also lock the screen without logging out using the command line. This is a great method if you are already using the command line and want to leave the PC.

The following command can be used in the Command Prompt, the Run Command box, Windows PowerShell, and Windows Terminal to lock the PC:

Rundll32.exe user32.dll,LockWorkStation

Lock the Windows computer from the Task Manager

You can also lock your computer from the Task Manager. This method basically disconnects your user account from this PC. Here is how to do it:

  1. Press the CTRL + Shift + Esc shortcut keys to launch the Task Manager.

  2. Switch to the Users tab.

  3. Right-click your user account and then click Disconnect.

    Disconnect user account from Task Manager
    Disconnect user account from Task Manager
  4. When asked for confirmation, click “Disconnect user“.

Note that performing these steps will only lock your user account, and you will not be logged off.

Lock Windows PC using a shortcut

You can also create a shortcut on the desktop of your account to lock the computer instantly. Here is how:

  1. Right-click on an empty space on the desktop, expand New, and then click Shortcut.

    Create a new shortcut
    Create a new shortcut
  2. When asked for the location of the item, paste the following and click Next:

    Rundll32.exe user32.dll,LockWorkStation
    Enter location for shortcut
    Enter location for shortcut
  3. Enter a name for the shortcut and click Finish.

    Name the shortcut
    Name the shortcut

After performing these steps, all you need to do is execute the shortcut to lock the computer.

Automatically lock Windows computer after inactivity

As you may be aware, the Windows computer comes with options to “Turn off the screen” and “Put the computer to sleep” after a certain time that you can define in the Settings or the Control Panel. However, there is no setting to only lock the screen while keeping the display awake.

Although Microsoft has not added such a feature directly, it can still be achieved.

The Windows OS can display the screen saver after a certain time of inactivity on the PC. You can configure your PC to display the screen saver after a certain time. When the PC recovers from the screen saver after you do perform some activity, you can configure it to go to the lock screen, instead of starting back up where you left off.

Here are the steps to automatically lock the Windows PC after a certain time of inactivity:

  1. Press the Windows key + i to open the Settings app.

  2. Go to Personalization.

  3. Click “Lock screen“.

    Open Lock Screen settings
    Open Lock Screen settings
  4. Click “Screen saver” under the “Related settings” section.

    Open Screen Saver settings
    Open Screen Saver settings
  5. Select a screen saver type from the drop-down menu, set a time for the screen saver to appear after inactivity, and select “On resume, display logon screen“.

    Configure a screen saver
    Configure a screen saver
  6. Click Apply and OK.

After performing these steps, the screen saver will appear after the defined time of inactivity. When you (or someone else) come back to the PC and perform any activity, the screen saver will disappear, and the lock screen will appear, asking the user to input the password to log back in.

This is how you can automatically lock the Windows PC after a certain time of inactivity.

Automatically lock computer using dynamic lock

Dynamic Lock is a Windows security feature that automatically locks your account as soon as you are away from the computer. It uses Bluetooth technology, and as soon as a paired device’s signals fall below a certain threshold, Windows automatically locks the account.

Dynamic Lock provides an additional layer of security in case a user forgets to lock the account. However, if a perpetrator gains access to the computer before the Bluetooth device is far away and the PC is not idle, the account will not lock.

To enable dynamic lock, you must have a phone paired with your PC. Even after pairing it, the phone must be connected to it via Bluetooth for Dynamic Lock to work.

Here are the steps to enable Dynamic Lock on Windows:

  1. Press the Windows key + i to open the Settings app.

  2. Go to “Accounts” and then “Sign-in options.”

    Open Sign in options
    Open Sign in options
  3. Click “Dynamic Lock” in the “Additional settings” section to expand it.

  4. Select “Allow Windows to automatically lock your device when you’re away.”

    Enable Dynamic Lock
    Enable Dynamic Lock

As mentioned earlier, this will only work when a phone is paired and connected to the device via Bluetooth. When a device i connected, it will be shown in the “Dynamic Lock” section, like this:

Phone conected via Bluetooth for Dynamic Lock
Phone connected via Bluetooth for Dynamic Lock

Now, if you leave the PC along with your phone, the Bluetooth connection signals will drop, automatically locking the PC.

Like all other methods above, this will not log you off, but only lock the PC.

Lock a Windows PC without locking the screen

There can be certain scenarios where you might want to lock a Windows PC without locking the screen. If you are watching a movie or having a video chat with your family or friends in a group and don’t want anyone to disturb the screen through the keyboard or mouse, you can simply lock the PC, but the screen and other peripherals will continue to work. However, this will need to be done using third-party apps.

KeyFreeze is one such app that locks the keyboard and mouse without locking the computer screen. Normally when we lock a PC, the screen changes to a locked one where we have to enter the password again to use the PC again. KeyFreeze gets rid of this situation and freezes the mouse and keyboard while leaving the screen open to make sure that no one can alter anything without your own intent.

KeyFreeze is such a small utility that it should not have an installer but the publisher has packed KeyFreeze in an installer. The setup comes in an online installer which will download and install the actual program upon execution.

KeyFreeze downloading and installing
KeyFreeze downloading and installing

The interface of KeyFreeze is very simple as it comes only with one button, “Lock Keyboard & Mouse“. You can click on the button to lock the keyboard and mouse while keeping the screen open. When you press the Lock keyboard and mouse button, it will lock the screen after 5 seconds.

One thing to note here is that if you are running KeyFreeze as an administrator, it will not ask you about running the app otherwise it will ask for admin permissions.

KeyFreeze interface to lock the PC
KeyFreeze interface to lock the PC

To unlock the keyboard and mouse, just press Ctrl + Alt + Del. This will release the keyboard and mouse immediately. You can press the Back button to proceed if you are using Windows 8.

Unlocking the Windows computer

If you lock your PC using any of the methods above, normally, all you must do is put in your password and log back into your account. However, under certain conditions, or in Windows Servers, you might need to press the CTRL + ALT + DELETE keys to unlock the computer and go to the lock screen, where you’ll be asked to input the password.

This will also be applied if your PC is managed by a domain and you need to log in using a NetID.

Closing Words

There are different methods, both manual and automatic, to lock a Windows PC. However, locking it would not log you off or close your apps and processes. It is a simple method to keep your device and data secure and private and prevent unauthorized access.

Moreover, KeyFreeze is a great program to keep your screen open while locking everything else. It should have been a portable utility so that we could keep it in our USB flash drives.

If you liked this post, Share it on:
Usman Khurshid is a seasoned IT Pro with over 15 years of experience in the IT industry. He has experience in everything from IT support, helpdesk, sysadmin, network admin, and cloud computing. He is also certified in Microsoft Technologies (MCTS and MCSA) and also Cisco Certified Professional in Routing and Switching.

5 comments

  • Shreya

    Going to try this. This is what that i am searching for. Thanks for sharing.

    • Usman Khurshid
      A
      Usman Khurshid

      Especially useful for me when I want to watch a movie with my daughter around :-D

  • Rick

    I ran the setup in a sandbox and grabbed just the exe which can be downloaded at:

    [link removed]

    I hate these online installations, especially when the program is a whooping 86k or so!

    • Concerned User
      Concerned User

      Don’t download Rick’s version here! Download from above.

      Rick, gtfo here with your dropbox BS. The original file is 500kb, half a megabyte. Which is almost nothing.

      • Usman Khurshid
        A
        Usman Khurshid

        I have removed Rick’s link. Although no antivirus detected anything in the file but Concerned User, you’re right it should always be downloaded from the official site.

Get Updates in Your Inbox

Sign up for the regular updates and be the first to know about the latest tech information