Automatically Lock Computer when Idle for Specified Time in Windows 10  

    Automatically Lock Computer when Idle for Specified Time in Windows 10

    Automatically Lock Computer when Idle for Specified Time in Windows 10

    How to Automatically Lock Computer when Idle for Specified Time in Windows 10
    Published by Category: General Tips
    25 Apr 2021
    Designer Media Ltd



    How to Automatically Lock Computer when Idle for Specified Time in Windows 10


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

    The Interactive logon: Machine inactivity limit security policy setting allows you to specify an amount in seconds of inactivity to wait before Windows 10 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.

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



    Contents

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






    OPTION ONE

    Enable or Disable Automatically Lock Computer in Local Security Policy


    This option is only available in the Windows 10 Pro and Enterprise editions.

    All editions can use Option Two below.


    1 Press the Win + R keys to open the Run dialog, type secpol.msc into Run, and click/tap on OK to open Local Security Policy.

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

    Automatically Lock Computer when Idle for Specified Time in Windows 10-automatically_lock_computer_secpol-1.jpg

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

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

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

    Automatically Lock Computer when Idle for Specified Time in Windows 10-automatically_lock_computer_secpol-2.png

    5 Close the Local Security Policy window.

    6 Restart the computer to apply.






    OPTION TWO

    Enable or Disable Automatically Lock Computer in Registry Editor


    1 Press the Win + R keys to open the Run dialog, type regedit into Run, and click/tap on OK to open Registry Editor.

    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 when Idle for Specified Time in Windows 10-automatically_lock_computer_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, then 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 lock after, and click/tap on OK. (see screenshot below)

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

    Automatically Lock Computer when Idle for Specified Time in Windows 10-automatically_lock_computer_regedit-2.png

    5 Close Registry Editor.

    6 Restart the computer to apply.


    That's it,
    Shawn






  1. Posts : 154
    10 (1909)
       #1

    Is this setting the same that can be accessed in the screensaver settings?
      My Computer


  2. Posts : 64,502
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #2

    avada said:
    Is this setting the same that can be accessed in the screensaver settings?
    Hello,

    This is a security policy setting instead, so not the same.
      My Computers


  3. Posts : 154
    10 (1909)
       #3

    Brink said:
    Hello,

    This is a security policy setting instead, so not the same.
    Any particular advantage to setting this instead of the screensaver to none but with the lockscreen checkbox?
      My Computer


  4. Posts : 64,502
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #4

    avada said:
    Any particular advantage to setting this instead of the screensaver to none but with the lockscreen checkbox?
    The policy in this tutorial will get applied to all users, and will directly lock the computer.

    The screensaver settings will only apply to the current user, and will only be a screensaver with or without requiring sign-in to resume.

    It really just depends on what works best for your situation.
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 05:37.
Find Us




Windows 10 Forums