Click here for important information about

Log off idle profile, log on another user, start a program

Hewlett-packard / Rfrb hpe-510t
November 19, 2015 at 07:58:33
Specs: Windows 7, 3.401 GHz / 6126 MB
Hello All,

I am reaching out today because I came across an odd situation I need help with. We have a multitude of PC's here that can be used for multiple purposes. What I am wanting to do is take a PC that has been idle for a while (1hr or so), log off that user, log on as another user, and start a set of programs for those other multiple purposes.

The thing about this is it all has to be automatic. When the user gets back to the PC, they will know to log it off and log on as themselves. But this action has to take place on its own with no manual interaction.

Anybody have any ideas?

20 years in IT and counting, baby
\m/ > < \m/

See More: Log off idle profile, log on another user, start a program

November 19, 2015 at 13:18:39
I must be missing the point horribly on the last bit. Not sure how they can log off and on without manual interaction. Thought transference maybe?

Always pop back and let us know the outcome - thanks

Report •

November 19, 2015 at 14:28:07
No, you're not missing the last point, you read it right. What needs to happen is after an hour, something kicks in that logs the current user off. That same thing logs on another user and a couple other programs. Once that's done, this thing is done with it's job.

20 years in IT and counting, baby
\m/ > < \m/

Report •

November 19, 2015 at 15:40:31
With Idle, you mean no user action/input?
You need to develope a script or program that will monitor user action and start to execute after 1 hour of user inaction.

Report •

Related Solutions

November 20, 2015 at 05:38:24
Will the logged in user know ahead of time that he/she will be logged off after a certain period of inactivity?

What "Multiple Purposes" do you need to run on the PC? Do these need to be done during the day?

Are you running AD? Or just Stand-alone computers?

Report •

November 20, 2015 at 09:24:57
@beachyhbt - yeah, they will know that after a certain period of time, they will be logged off. We will explain that to them. The multiple purposes are just various programs that need to open and stay open. We are in AD, yes.

@sluc - yes, no user action/input. This program/script has to do all of it on it's own. Would you be able to point me in the right direction a bit? How would something like this be created? Any ideas you have would be helpful!

20 years in IT and counting, baby
\m/ > < \m/

Report •

November 20, 2015 at 21:42:01
Due to security restrictions I don't know any way to log off and automatically log into another account.

You could however set up a batch file to reboot the computer after someone has logged on at a given time interval. You could put the batch file in their startup folder or the public startup folder which would trigger for all users. Once it rebooted, it would log on to an auto logon account.

There might also be a way to refine this with a script that would measure the time the computer sat idle. If you're interested in pursuing this method, post back and I'll look into this further.

message edited by THX 1138

Report •

November 21, 2015 at 06:51:33
So, let's break it down and talk theory.

Logging off at 1 hour of inactivity - Group policy has a explicit policy for logging off idle users, but it's designed for Terminal Servers (or RDP Servers, or whatever MS is calling it these days), so the policy doesn't work when fast user switching is enabled. You can disable FUS, and try the policy (now that I think about it, I'm not sure the console session is considered for an idle timeout).

If that doesn't work, there are "screen savers" that will log the user out when they're triggered. You can install one, and use GP to enforce their activation after an idle hour. Not sure if screen savers trigger on disconnected sessions, but that may not be an issue.

I've also seen scripts out there that search for idle sessions, and terminates them after a time. These scripts need to be configured to run every X minutes in Task Scheduler.

Firing up a bunch of programs on logon - Simple enough. That's what the "Start Menu\Programs\Startup" folder is for, after all. You can even automate any app placement / button presses through scripting. It's not difficult, just tedious.

Spontaneous user logon - The tricky part. Good news is it's theoretically possible. Bad news is I know of no program you can purchase that will. You'll have to (get someone to) write a credential provider (assuming Vista+) for your system. You'll also probably need a service to control the provider, and let it know if it should log on your secondary user. The Windows 7 SDK has some examples of credential providers and services, so there's your start. Just be careful. If your credential provider crashes and burns, don't expect to get into the system without off-line registry modification.

How To Ask Questions The Smart Way

Report •

November 22, 2015 at 16:46:32
If you're running a Domain (and I'm assuming using GPOs,) why do you need to log the idles users off to run whatever you need to run?

Just from my experience, if I were to tell users they would be logged off after an hour of being idle (and what constitutes idle?) I and my other Admins would never hear the end of it. Logging anyone off will cause them to lose any files that are open and haven't been saved, running processes/scripts will stop, etc. This could detrimental to Business Operations.

You might want to think of using alternatives to logging users off, especially during business hours. Just my $.02.

Report •

Ask Question