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

Secure Your Windows 11/10 PC with Auto-Lock Feature after Inactivity.

When we think of the countless files, personal documents, and confidential data stored on our computers, ensuring their security becomes paramount. This significance escalates when you share your laptop or PC with others or work in environments like offices, where multiple individuals have access to the same device. Automatically locking the screen of your Windows 11 becomes an indispensable feature, especially for those moments when you inadvertently neglect to secure your computer. With the intricacies and vastness of the Windows 11 operating system, a single lapse can leave critical system files and private user data exposed. Thankfully, Windows provides a robust security measure in the form of the Local Security Policy (secpol.msc) that lets you automatically lock your PC after a period of inactivity, ensuring consistent protection across all user accounts. Dive into this risewindows guide, and let us unravel the steps to enable auto-lock on your Windows 11/10 PC, fortifying its defenses against unauthorized access.

Note: For those using Windows 11/10 Home edition, the Local Security Policy (secpol.msc) is not inherently available. However, you can introduce it to your system via a specific script, ensuring you’re not left without this vital security tool.

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

Follow these steps to turn on Auto Lock in Windows 11/10 PC for All Users after Inactivity:-

Step 1. Firstly, use the Windows + R 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 to “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?

Follow these steps to turn on 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 instance, 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.


Automatically locking your computer screen after periods of inactivity is a crucial measure to protect your private data and system files, especially in shared environments or workplaces. By employing the Local Security Policy or the Registry Editor, users of Windows 11/10 can easily set up this security feature. As always, it’s vital to handle such system-level configurations with care to avoid unintentional mishaps.


Leave a Comment

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

How to Reset Sound Drivers on Windows 11?

Sound issues on a computer can stem from various problems, but one common culprit is often outdated or corrupted sound drivers. These drivers, responsible...

How to Open Command Prompt as Administrator on Windows 11/10/8/7?

Command Prompt, often abbreviated as cmd, has been an integral tool for Windows users since the early days of the operating system. Whether you're...

How to Turn on the UWP File Explorer on Windows 11?

Navigating the intricate digital ecosystem of Windows, you might have stumbled upon the term UWP or Universal Windows Platform. This is Microsoft's evolution for...

How to Enable or Disable IPv6 on Windows 11 or 10?

In the dynamic world of the Internet, staying updated with the latest technology is essential. Internet Protocol version 6 (IPv6) is the newest version...

How to Enable or Disable IPv4 on Windows 11 or 10?

IPv4 (Internet Protocol version 4) is the predominant protocol used for transmitting data over the vast networks of our modern digital age. Serving as...