If you are security conscious, you may be interested in setting your computer to automatically lock the user session after a period of inactivity. For example, if you walk away from your desk to grab a coffee but forget to lock it, after a period of 300 seconds you could force Windows 11 to present the logon screen. This is especially useful in workplaces or public areas where you would want to protect data.
There are two ways to achieve this and both are reasonably complicated. To simplify the steps, we have generated a .reg file which you can run and perform the changes automatically. Inside this attached .zip file are 3 files - one which disables the inactivity lock and two files with preconfigured timeouts of 120s and 300s.
To use our registry modification files:
To manually modify the registry:
There are two ways to achieve this and both are reasonably complicated. To simplify the steps, we have generated a .reg file which you can run and perform the changes automatically. Inside this attached .zip file are 3 files - one which disables the inactivity lock and two files with preconfigured timeouts of 120s and 300s.
To use our registry modification files:
- Download the attached .zip file.
- Extract the files to a folder.
- Look at the filename for the disable, 120s and 300s timeout choices.
- Run the .reg file that corresponds to the timeout you would like.
- Accept the warning for running a .reg file (I suggest you never run a .reg file without inspecting the contents).
- Reboot the computer once the registry modification is complete.
To manually modify the registry:
- Run "regedit"
- Browse to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
- Search for a DWORD value of "InactivityTimeoutSecs" in the right column and double click it.
- Edit the Value Data and enter a Decimal number, relating to the number of seconds of inactivity before locking Windows 11.