Tech Support Forum banner
Status
Not open for further replies.
1 - 7 of 7 Posts

·
Registered
Joined
·
4 Posts
Discussion Starter · #1 ·
Hi.
I would like to find a way to setup power settings in Win7 so that the computer only sleeps when a user is not logged on. Perhaps a different power scheme set when a user is not logged on vs. when a user is logged on? Any help would... help... (sorry for that)

(We want the computers to always stay on when teachers/students are logged on so that they don't think the computer "turned off" and then they forget to log out.)
 

·
Administrator, Manager, Microsoft Support, MVP
Joined
·
34,403 Posts
Re: Power Settings so Win7 only sleeps when user is NOT logged in.

Hi -

Info from Microsoft on Power Options -

Power management - Windows 7 features - Microsoft Windows

Windows 7 Features: Power Management

Says "Vista", but applicable to Windows 7 - Power plans: frequently asked questions

Reset power options -
START | type power | "Power Options" | "change plan settings" | "Restore default settings for this plan"

Or click on "Change Plan Settings" once in Power Options and adjust sleep = NEVER.

Regards. . .

jcgriff2

`
 

·
Registered
Joined
·
4 Posts
Discussion Starter · #3 ·
Re: Power Settings so Win7 only sleeps when user is NOT logged in.

Thanks. But...

We still want the machine to sleep when the machine is logged off. If they are not logged in they should go to "sleep" after a certain point of inactivity. But when they are logged in, they should never "sleep".

So a single power setting would not cover both:
logged in = never sleep
AND logged off = can sleep.

or am i missing something? (Which is always possible)
 

·
Administrator, Manager, Microsoft Support, MVP
Joined
·
34,403 Posts
Re: Power Settings so Win7 only sleeps when user is NOT logged in.

Never sleep while logged in even if idle period is hours long?
 

·
Registered
Joined
·
4 Posts
Discussion Starter · #5 ·
Re: Power Settings so Win7 only sleeps when user is NOT logged in.

Yes, that is correct. And yes, I know that seems...strange, but...

This is for our classroom lab side where users are not logged on for more then 2 hours at a time, and for our Library where users log in and out all day long.

The reason we don't want the machines to sleep when logged in is that our users have been known to "forget" that they are still logged in at the end of class. (Users tend to log in at the start of class. If the instructor is lecturing all class, the machine will fall to sleep.) Or since the machine would go to the S3 sleep state, our users will think the machine turned itself off and is therefore "broken". (How many times have I went to a room just to hit the power button... :sigh:)

(When logged off, we want the machine to fall into S3 sleep state to save power and then come right back to the logon screen when the next user wants to log on.)

Hopefully this helps explain what I would like to accomplish?
 

·
Visiting BSOD Expert, Microsoft Support Team
Joined
·
781 Posts
Re: Power Settings so Win7 only sleeps when user is NOT logged in.

There's no way to keep a system awake when someone is logged on by modifying just the default power options - Windows checks regardless of whether or not you're logged on. However, there are functions that you can call in an application that will keep a system awake, so you could write an app that started at user logon and shut down when the user logged off that could achieve this. Here's the MSDN article about the SetThreadExecutionState function, and here's the source code and a free MS utility based off of it on MSDN you could use as an example. Note that this sample app does not stop the display from turning off at idle, but the machine won't sleep as long as that application is running (it resets the sleep timers so the machine never goes idle long enough to sleep). You *can* keep the display from sleeping, but the sample app does not set the ES_DISPLAY_REQUIRED parameter - you'd have to rebuild the app with the source and add it yourself, or configure your power options to never sleep the display, ever.
 
1 - 7 of 7 Posts
Status
Not open for further replies.
Top