Accounts Automatically Lock Computer after Inactivity in Windows 11


  • Staff
Lock_screen_banner.png

When you lock the computer, it protects the computer from unauthorized use when you need to step away from the PC, and don't want to sign out or shut down causing everything open to be closed.

When you lock the computer, you will be taken to the lock screen by default to dismiss and sign in when ready to continue where you left off. Other users can still sign in to their accounts from the sign-in screen.

The Interactive logon: Machine inactivity limit security policy setting allows you to specify an amount in seconds of user inactivity to wait before Windows will automatically lock the computer.

This tutorial will show you how to enable or disable automatically lock computer after specified seconds of inactivity for all users in Windows 10 and Windows 11.


You must be signed in as an administrator to enable or disable automatically lock computer after inactivity.




Contents

  • Option One: Enable or Disable Automatically Lock Computer after Inactivity in Local Security Policy
  • Option Two: Enable or Disable Automatically Lock Computer after Inactivity in Registry Editor




Option One

Enable or Disable Automatically Lock Computer after Inactivity in Local Security Policy


Local Security Policy is only available in the Windows 11 Pro, Enterprise, and Education editions.

All editions can use Option Two to set the same policy.


1 Open Local Security Policy (secpol.msc).

2 Double click/tap on Local Policies in the left pane to expand, and click/tap on Security Options to open it. (see screenshot below)

Automatically_lock_computer_after_inactivity_secpol-1.png

3 In the right pane of Security Options, double click/tap on the Interactive logon: Machine inactivity limit policy to open its properties. (see screenshot above)

4 Enter a number between 0 to 599940 for how many seconds of inactivity you want to automatically lock computer after, and click/tap on OK. (see screenshot below)

The default is 0 (zero) seconds to not automatically lock the computer.


Automatically_lock_computer_after_inactivity_secpol-2.png

5 Close the Local Security Policy window.

6 Restart the computer to apply.




Option Two

Enable or Disable Automatically Lock Computer after Inactivity in Registry Editor


1 Open Registry Editor (regedit.exe).

2 Navigate to the registry key below in the left pane of Registry Editor. (see screenshot below)

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

Automatically_lock_computer_after_inactivity_regedit-1.png

3 In the right pane of the System key, double click/tap on the InactivityTimeoutSecs DWORD to modify it. (see screenshot above)

If you do not have a InactivityTimeoutSecs DWORD, right click or press and hold on an empty space in the right pane of the System key, click/tap on New, click/tap on DWORD (32-bit) Value, type InactivityTimeoutSecs for the name, and press Enter.


4 Select (dot) Decimal, enter a number between 0 to 599940 for how many seconds of inactivity you want to automatically lock computer after, and click/tap on OK. (see screenshot below)

The default is 0 (zero) seconds to not automatically lock the computer.


Automatically_lock_computer_after_inactivity_regedit-2.png

5 Close Registry Editor.

6 Restart the computer to apply.


That's it,
Shawn Brink


 

Attachments

  • Lock_sceen.png
    Lock_sceen.png
    1.3 KB · Views: 27
Top Bottom