Automatically Log Off Inactive Windows 7 Users after a specified period of time; learn two different methods to automatically log off an inactive user on Windows 7.
In my house we have a media server/Minecraft machine that my son uses. It runs Plex, our shared iTunes library, etc. In addition to that it’s the main machine my kid uses to surf the net or, more importantly to him lately, to pay Minecraft. He’s with me 50% of the time so there’s no reason that the other 50% of the time, if he’s not using it, that his user should remain logged into the machine. If you have a similar scenario, or any other reason you’d want to automatically log off an inactive Windows account here’s how.
Automatically Log Off Users via Registry Setting and Screensaver
I had to poke around for a while to figure out how to make Windows automatically log off a user; it seems like it’s harder than it should be and I don’t know why something like this isn’t built right into the OS. In order to set up your machine to automatically log off an inactive user you’ll need to have admin rights to the machine, download a toolkit from Microsoft, and make some registry settings. If you’re not comfortable with any of that you might want to skip to the section at the bottom for a 3rd party utility to handle this for you. Don’t worry though, it’s not terribly difficult if you know some Windows basics and follow the steps.
Steps to configure an account to automatically log off
Remember, you’ll need to be logged on as administrator or with an account with administrator privileges in order to configure Windows to automatically log off a user after a specified time period. We’ll be making registry changes in these steps so make a backup first. If you’re not comfortable with this (you can potentially f’up your Windows installation) skip to the next section. For more information about how to back up and restore the registry, check out How to back up and restore the registry on the Microsoft Knowledge Base.
Step by step instructions to automatically log off a Windows user:
- Ensure you’re logged in as admin or with an account that has admin rights
- Download and install the Windows 2003 Resource Kit from Microsoft. It contains WINEXIT screensaver that allows use to make a user automatically log off. The Windows 2003 Resource Kit can be downloaded here.
- Once it’s installed copy WINEXIT.scr to your System32 directory. (this is version specific)
- Windows 32 bit: Copy C:\Program Files\Windows Resource Kits\Tools\WINEXIT.scr to C:\Windows\System32\
- Windows 64 bit: Copy C:\Program Files (x86)\Windows Resource Kits\Tools\WINEXIT.scr to C:\Windows\System32\
- Fire up the registry editor via the Start Menu or by hitting the orb and typing regedit in the input box and hitting Enter.
- Open the registry key for IniFileMappings\Control.ini (this is version specific); this is where we modify the registry to allow non-admins to use the application to automatically log off Windows
- Windows 32 bit: the key is: HKEY_Local_Machine\Software\Microsoft\Windows NT\CurrentVersion\IniFileMappings\Control.ini
- Windows 64 bit: the key is: HKEY_Local_Machine\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\IniFileMappings\Control.ini
- Right click on Control.ini and select Permissions
- Click add and when the dialog box pops up add Everyone
- Highlight the new Everyone entry and click the Advanced button and you’ll see the following dialog box
- Select Everyone and then click the Edit button
- Click to select the Set Value and Create Subkey check boxes
- Click OK, and then click OK
- Close the Registry Editor and then restart the computer