How to Enable Auto Lock on Windows 11/10 PC for All Users after Inactivity?


When we have a computer or digital device, we must know the importance of security methods to protect our content. These locks are essential if the laptop is shared or we work with more people, such as in an office. That is why automatically locking the Windows 11 screen is crucial if, at any time, we forget to put security on our computer.

The security of the Windows 11 operating system is essential because, through it, we can prevent critical system files and user files from remaining available and intact. To secure your PC from prying eyes, you can apply a policy using the Local Security Policy (secpol. msc). Although you apply through “secpol.msc,” it applies to all user accounts on your computer. In this risewindows article, we will show you how to turn on auto-lock on Windows 11 PC for all users after inactivity.

Note: Local Security Policy is not a part of Windows 11/10 Home edition. If you need, you can enable Local Security Policy (secpol.msc) using a script.

How to Enable Auto Lock in Windows 11/10 PC for All Users after Inactivity?

Step 1. Firstly, use the Windows + [/keybt]R[/keybt] keys combination to open the Run command box.

Step 2. Now, type secpol.msc and hit Enter from the keyboard to open the Local Security Policy window.

Step 3. Then, navigate to the following path from the left sidebar when the Local Security Policy window opens:-

Local Policies > Security Options

Step 4. After that, on the right side pane of the “Security Options” folder, look for the policy name “Interactive logon: Machine inactivity limit.” Then double-click on this policy to configure its settings.

Step 5. Next, set the desired inactivity time in seconds from “0” to “599940” seconds under “Machine will be locked after.” If you set the time is “0” seconds, the policy turns off, and your PC will never lock after any inactivity.

Step 6. Now, click Apply.

Step 7. Then, click OK.

Step 8. Finally, reboot your computer now.

Once you restart your computer, the policy applies to your PC. The computer screen will automatically lock when it has been idle for the specified inactivity limit. You’ll need to enter your password to unlock it.

How to Enable Auto-Lock in Windows 11/10 PC after Inactivity using Registry Editor?

Step 1. As usual, open the Registry Editor.

Step 2. Now, navigate to the following key from the left sidebar when the Registry Editor window opens:-


Step 3. Then, right-click the “System” folder, and select New > DWORD (32-bit) Value. Name it as InactivityTimeoutSecs.

Step 4. Next, double-click on the “InactivityTimeoutSecs” to modify its value. Select base as “Decimal” in the pop-up window and enter the amount of idle time before Windows 11/10 locks the screen. For example, if you want Windows to auto-lock your PC after “10” minutes of inactivity, set the value to “600.”

Step 5. After that, click OK.

Step 6. Finally, close the registry editor and reboot your computer to apply the changes.

That should do it.

I hope this post will be helpful to you.

Keep learning & Keep growing, guys.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.