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.

Run the Registry Editor

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.

Free PC tips by email

Search Windows Guides


4 thoughts on “Force Idle Users to Log Off After a Period of Inactivity [How To]”

  1. Alan says:

    GPEdit is not available in Home Premium, how do we prevent the screensaver from being changed if we dont have Pro or Ultimate?

  2. Rich says:

    Thanks for sharing your solution!

  3. Dan W Randolph says:

    Thanks for the info.
    One change for Windows Server 2008:
    1. Go to “Remote Desktop Session Host Configuration” in the start menu search box.

  4. Abdul Khan says:

    Thanks a lot… I saw this suggestion posted somewhere else but wasn’t sure the screensaver could still be called on Windows 7. I am going to give this a shot!

Comments are closed.

Computer tips in your inbox
Sign up for the Windows Guides newsletter to get PC tips and access to free Windows books (More details)

Subscribe now
Popular Guides

See which sites have been visited on your PC (even if private browsing mode is used)

Create a Windows 7 System Repair Disc

Best Free Anti-malware

Hibernate vs. Sleep vs. Shut-Down

i3, i5, and i7; Dual, Quad, Hexa Core Processors. How to they Differ?

Intel's Ivy Bridge Processor: new Features

Windows Guides on Facebook