automatic logout after inactivity/idle
i am trying to setup an automated logout after an idle period for regular domain users. this is a lab environment running windows 7 enterprise x64. we used winexit.scr before, but it looks like it is incompatible with windows 7. i have tried making a scheduled task for this purpose but it never executes. i found a program that will do the logoff and i tried to make a scheduled task to execute the program but it never triggers. has anyone done this successfully?
April 7th, 2010 1:12am

If I'm not mistaken there's a Group Policy just for doing that... But what is your motivation? Keep in mind you may have users who might like to leave things running and take up where they left off. I'm sure someone trying to either continue his/her work where they left off the next morning (or even later that night) and avoid the time to set up again would be mighty peeved if you simply ended their session. The computer may well be inactive, but there can still be a great deal of CONTEXT in what they have left on their screens. What if, for example, they had entered 100 out of 200 names into a list, and have no way to save until they're done? Look for threads on this forum about people upset about being logged off when they disconnect their RDP sessions, for example. Isn't locking the screen via requiring a password to exit the screen saver just as secure? -Noel
Free Windows Admin Tool Kit Click here and download it now
April 7th, 2010 4:26am

You may try this. Shutdown Timer Important Note: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.Arthur Xie - MSFT
April 9th, 2010 12:31pm

READ (above): i am trying to setup an automated logout after an idle period for regular domain users. This is a lab environment running windows 7 enterprise x64. Once again Microsoft has no concept of what is needed in an Educational Enterprise environment. First, copy to default profile is disabled and now Winexit is dead. No thought given to how the real users use W7.
Free Windows Admin Tool Kit Click here and download it now
April 13th, 2010 1:17am

My apologies; when I wrote "There is a group policy for doing just that" I believe I was thinking of idle Remote Desktop sessions. Saying "This is a lab environment" is a rather thin way of expressing your needs. Please try to understand that not everyone is standing next to you and implicitly understands what you mean. If by "this is a lab environment" you mean the computers are shared amongst many individuals who often neglect to log out, it would be much more reasonable to force logouts than if you were setting up people's dedicated desktops to be logged out for some unspecified "security reasons". Personally, way back when I worked in corporate environments where I wasn't the admin, I always hated it when the admins thought they knew better than I did whether my computer should be logged-out, because I often left stuff running that I wanted preserved. Assuming you are willing to take the heat from users who might lose work they've neglected to save, what I might do is explore the Task Scheduler. For example, you could schedule a SHUTDOWN /L command that will run only when the computer is idle. -Noel
April 13th, 2010 2:38am

i've tried making a scheduled task with shutdown /l and it has failed to work. i read something about you can't initiate shutdown.exe through task scheduling? and yes our background clearly states in plain view inactivity of 30 mins will cause a logoff.
Free Windows Admin Tool Kit Click here and download it now
April 13th, 2010 3:51am

I got it to work this evening, so it is possible. I'll post the details when I get back to the computer. -Noel
April 13th, 2010 4:40am

I'm not sure it's working consistently, but here's what I've been able to get to log off the computer at least twice: A scheduled task named "Log Off Idle Session", set to run when the user logs on or when the system goes idle, and with Conditions set to run only if idle for 30 minutes. It's set to run only when user is logged on and [ ] Run with highest privileges is checked. Here's the config. I'll continue to experiment to see if it works consistently. Perhaps this can help get you closer. -Noel
Free Windows Admin Tool Kit Click here and download it now
April 13th, 2010 5:29am

A little more research: Apparently the Task Scheduler only checks for an "Idle" condition every 15 minutes: http://msdn.microsoft.com/en-us/library/aa383561(VS.85).aspx I've made some changes to the above config and will be trying it out tonight. -Noel
April 13th, 2010 6:02am

Okay, I have a configuration that appears to work, logging the user out after 30 minutes of inactivity. I've updated the screen grabs above to show it. -Noel
Free Windows Admin Tool Kit Click here and download it now
April 13th, 2010 3:39pm

Thanks Noel for your contribution on this one. Will this be set for all users? Or will Default have to be copied over? Thanks!
April 28th, 2010 7:38pm

After copying Noel's exact configuration, it still doesn't seem to work. I even tested with setting it to 1 minute rather than 30. It works if I click "Run" from the manager, but it doesn't run on it's own. Any ideas? Thanks!
Free Windows Admin Tool Kit Click here and download it now
April 28th, 2010 9:58pm

According to the documentation, the Task Scheduler checks for "idle" condition every 15 minutes, so you can't expect it to run reliably at 1 minute. That was what I found in my testing, and it did make testing quite tricky. As far as whether it will be set for all users, it will only be set for whatever user you schedule it for. As far as getting it to be the default for all users, I'm not completely sure how to go about that. Most likely, as you say, the Default user profile will have to be adjusted. -Noel
April 28th, 2010 10:55pm

I am trying to use this task by deploying it through group policy. I can get it to deploy but I need it to run as any user logged on the system. This could be anyone in the domain. Looking at the event logs, the task tries to run but doe not have the correct permissions. I have tried %USERDOMAIN%\%USERNAME% but that leaves me with MYDOMAIN\COMPUTERNAME$. I need it to run in the user's security context and not the computers context. This may be as simple as deploying it through the User Configuration of the GPO instead of the Computer Configuration. What do you guys think?
Free Windows Admin Tool Kit Click here and download it now
August 18th, 2010 6:11am

I was wondering if setting up an idle task would work for something like this. Thanks for the work! I didn't know exactly how often Windows checked on the computer idle time. If anyone is interested in a screensaver replacement to winexit.scr, I recommend trying http://www.grimadmin.com/staticpages/index.php/ss-operations .
September 22nd, 2010 12:01am

what do you care what his reasons are? is your advice based on what you think? you spend more time postulating and hypothesizing. just go somewhere else - notwithstanding your sheduled task solution. we have public access pc's. we want them LOGGED OFF after 30 minutes of inactivity. AND i'm trying to audit a count of logons for management. if user 1 never logs off, and n1, n2,n... users come up, i cant get a count as well - you may be aware - the only way to unlock a locked xp pc - is to power cycle. we also have shared computers. if a user is too lazy to log off - then the next person has to power cycle - or - so we don't hurt your sensibilities - should we call you at your villa in spain - just so you son't lose - 200 entires without saving - are you nuts - they deserve to lose it just on principle. you further the cause of grown adults with advanced degrees, families, mortgages and every other vestige of adulthood - BUT - when they sit down at their computer they're a bag a babbling stupity - don't bother flaming - i've got enough to do what we need to do and probably won't be back for awhile - you dope.
Free Windows Admin Tool Kit Click here and download it now
April 29th, 2011 4:38pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics