Not too long ago we encountered some problem with our users that share PC’s in different locations on our network. Some users do not always log-off their PC’s when they have to go into the plant. Now from where they are on the network, they remote desktop into another workstation for a particular system developed in-house.
Now if a user does not log-off, this remote desktop connection stays logged-in and makes it so no-one else can use that PC. Therefore, I was tasked with finding a way to log a user off if there is no activity for a certain amount of time.
I searched on Google and couldn’t find any other solution except this one. This involves getting hold of the “winexit.scr” screensaver contained in The Microsoft Windows 2000 Resource Kit, or you can read about and download individual resources from this toolkit here.
You simply copy this .scr file into “C:\Windows\System32\”, then this screensaver will be available to select and configure like all the others.
Then you need to ensure that it will work with any user and not only Administrators. This you do by allowing access to a specific key in the registry.
When you have opened the Registry Editor, you goto;
HKEY_Local_Machine\Software\Microsoft\Windows NT\CurrentVersion\IniFileMappings\Control.ini
Right-click on “Control.ini” and click Permissions.
In the Group or Usernames box, add Everyone, and then click Advanced.
In the next dialogue box, with “Everyone” selected, click on Edit.
Click the Set Value and Create Subkey check boxes to select them.
Click OK, and then click Apply and OK, and then click Apply and OK again.
Close Regedit
This causes the screensaver to work with any user that is logged on.
The last thing to do is to make sure the user does not change the screensaver to another one that will not perform the log-off function. This you need to set-up in the Group Policy Editor.
When you have opened the Group Policy Editor, you go to:
User Configuration -> Administrative Templates -> Control Panel -> Personalization
Set “Screen Saver Timeout” to 300
Set “Force Specific Screen Saver” to %SystemRoot%\System32\winexit.scr
Set “Prevent Changing Screen Saver” to Enabled
Set “Enable Screensaver” to Enabled
Close GPedit
Now, when the user has not moved the mouse or hasn’t typed anything in 5 minutes, the PC will be logged off automatically, allowing other users to make use of the network resources otherwise engaged.
![01 - Run regedit 01 Run regedit 500x282 Force Idle Users to Log Off After a Period of Inactivity [How To]](http://i0.wp.com/mintywhite.com/wp-content/uploads/2010/09/01-Run-regedit.jpg?resize=500%2C282)
![02 - Control.ini 02 Control.ini 500x257 Force Idle Users to Log Off After a Period of Inactivity [How To]](http://i2.wp.com/mintywhite.com/wp-content/uploads/2010/09/02-Control.ini_.jpg?resize=500%2C257)
![03 - Permissions 03 Permissions 500x257 Force Idle Users to Log Off After a Period of Inactivity [How To]](http://i0.wp.com/mintywhite.com/wp-content/uploads/2010/09/03-Permissions.jpg?resize=500%2C257)
![04 - Add 04 Add Force Idle Users to Log Off After a Period of Inactivity [How To]](http://i2.wp.com/mintywhite.com/wp-content/uploads/2010/09/04-Add.jpg?resize=377%2C456)
![05 - Everyone 05 Everyone Force Idle Users to Log Off After a Period of Inactivity [How To]](http://i1.wp.com/mintywhite.com/wp-content/uploads/2010/09/05-Everyone.jpg?resize=471%2C257)
![06 - Advanced 06 Advanced 500x378 Force Idle Users to Log Off After a Period of Inactivity [How To]](http://i0.wp.com/mintywhite.com/wp-content/uploads/2010/09/06-Advanced.jpg?resize=500%2C378)
![07 - Set Key 07 Set Key1 Force Idle Users to Log Off After a Period of Inactivity [How To]](http://i1.wp.com/mintywhite.com/wp-content/uploads/2010/09/07-Set-Key1.jpg?resize=377%2C481)
![08 - Run GPEdit.msc 08 Run GPEdit.msc1 Force Idle Users to Log Off After a Period of Inactivity [How To]](http://i0.wp.com/mintywhite.com/wp-content/uploads/2010/09/08-Run-GPEdit.msc1.jpg?resize=411%2C635)
![09 - GPEdit 09 GPEdit 500x282 Force Idle Users to Log Off After a Period of Inactivity [How To]](http://i2.wp.com/mintywhite.com/wp-content/uploads/2010/09/09-GPEdit.jpg?resize=500%2C282)
![10 - Screensaver Timeout 10 Screensaver Timeout 500x458 Force Idle Users to Log Off After a Period of Inactivity [How To]](http://i2.wp.com/mintywhite.com/wp-content/uploads/2010/09/10-Screensaver-Timeout.jpg?resize=500%2C458)
![11 - Force Specific Screen Saver 11 Force Specific Screen Saver 500x458 Force Idle Users to Log Off After a Period of Inactivity [How To]](http://i0.wp.com/mintywhite.com/wp-content/uploads/2010/09/11-Force-Specific-Screen-Saver.jpg?resize=500%2C458)
![12 - Prevent Changing Screen Saver 12 Prevent Changing Screen Saver 500x458 Force Idle Users to Log Off After a Period of Inactivity [How To]](http://i2.wp.com/mintywhite.com/wp-content/uploads/2010/09/12-Prevent-Changing-Screen-Saver.jpg?resize=500%2C458)
![13 - Enable Screen Saver 13 Enable Screen Saver 500x458 Force Idle Users to Log Off After a Period of Inactivity [How To]](http://i1.wp.com/mintywhite.com/wp-content/uploads/2010/09/13-Enable-Screen-Saver.jpg?resize=500%2C458)
Search Windows Guides