|11 Jul 2012||#1|
| || |
Automatic Sleep following Logoff (AKA One-click Log off & Standby)
This topic had been covered before in another thread posted last year, but the solution referred to still required me to do a fair bit of digging and playing to be able to get it to work as I wanted. So, to help others that may want to do the same, I thought Iíd provide a consolidated ďHow ToĒ on this. Since Iím a novice to most of the techniques used here Iíve covered the basics for those who may be in the same position - so for you experts out there please forgive the sound of sucking eggs!
There is one caveat to this solution Ė I was hoping that this post would be providing a complete solution. There is however one niggle that I donít have an answer to and am requesting suggestions. See the last section below.
I have a home PC (running Windows 7 Pro 64) with four accounts (each without passwords). I want to have the PC to go into Sleep most of the time instead of Shutting Down. If, from one of the accounts, you put the PC into Sleep then, when it wakes, it does not present the normal Logon screen with all accounts - it just shows a logon for the last account (which is logical since you may have had programs open). However, if itís not the account you want, you have to go into the account, logoff and then go into the account you want (or switch user).
The Logoff and Sleep can obviously be done by logging off and then selecting Sleep from the options on the login screen. But I find that this two-click process is far too much effort and I was keen to find a single click solution! I was also keen to find a solution that did not use any third party utilities.
To me this function makes absolute sense. Why would you want the machine to sit there in the logon screen without going into a power saving mode almost immediately. And as far as I can see thereís no way of setting the power saving mode for the logon screen separately.
Credit Where Creditís Due
As I mentioned, this had been covered in a previous thread on this forum:
Which had a link to:
And credit to this solution really goes to 4wd and other contributors on that forum.
I had a couple of problems with the solution as defined in those threads. First, it had a prerequisite that the user account had a password and, secondly, it required the use of a shortcut on the desktop to perform the Logoff/Sleep function rather than using the normal Logoff function from the Shutdown button. So Iíve refined it a bit.
The basic principle is to use Task Scheduler to set a task to force the computer to go into Sleep 30 seconds after someone logs off. It also has a task that kills the automatic Sleep if another user logs on within the 30 seconds (this is the main refinement since the previous solution was to use batch files to enable and disable the task).
If passwords are not used then the set up of the tasks requires you to disable the password requirement using the Local Administrative Tools
And finally, you have to completely disable Hibernation. Without doing this then the PC will go into Hibernation instead of Sleep.
The process to set this up takes a few minutes and requires the following five steps (which are detailed in the attached PDF):
1. Disable Hibernation
2. Disable Password requirement for the Tasks (if passwords not used)
3. Set Up a Task for Delayed Sleep triggered from a logoff (LogoffSleep task)
4. Set up a Task to Kill the LogoffSleep task if someone logs back in (LogoffSleepKill task)
5. And, if you want, change the default Shutdown button to Logoff
So, if you want to try the Logoff/Sleep function, follow the instructions and test it out. Then feed back any issues Ė although I doubt if Iíll be able to come up with the answers but Iím sure thereíll be others here who will be able to help!
And a few questions for the experts
The niggle I have with the set up described here is that if you have to do a shutdown to install updates, the computer logs itself off and then hangs on the log-off screen whilst it does the updates Ė this can invariably take longer than 30 seconds. The computer will therefore be forced into a sleep during this update. Now this has happened to me and when you wake the computer up it appears to complete the update without apparent complaints. What I would really like to know if there is any way of detecting that this is happening and prevent the sleep kicking in. I could resort to using a batch file to disable the Task before doing the shutdown but it's not very elegant (since you'll then ahve to re-enable it (can you use a task to enable another task? If you can then you can use this to enable it at logon))
Also, can any of you see other issues with the process describe here? Specifically any issues related to disabling the password requirement for the scheduled tasks. Thereís obviously a chance that if, once someoneís logged out, thereís a delay in another person logging on thereís slim chance that the LogoffSleep task could be triggered half way through the login process and just before the LogoffSleepKill task stops it. Itís a remote possibility but do you think this would be an issue?
And finally, some information I could not track down was a list of all Event IDs for Winlogon process or any specific reference info for powrprof.dll. If anybody can oblige Iíd appreciate it.
|My System Specs|
|21 Nov 2012||#2|
| || |
i wanted hybrid sleep enabled, so i used a .bat file with psshutdown from systernals
psshutdown -d -t 0 /accepteula
the thing is, it goes to sleep, then when waked up it finishes logging off , but it's fast enough to be no problem, on an old atlhon 64 3000 single core. No need to disable hibernation so hybrid sleep is enabled, which is crucial for me. Also no need to do extra stuff so that's a plus.
|My System Specs|
|Similar help and support threads for2: Automatic Sleep following Logoff (AKA One-click Log off & Standby)|
|Roaming Profiles not syncing on logoff after sleep mode||General Discussion|
|Configure device to allow automatic standby||Hardware & Devices|
|Log off & Standby in 1-Click ?||General Discussion|
|Shutdown, LogOff, Sleep, and Hibernation Question?||General Discussion|
|7 logs me off after short idle (not sleep, logoff)||General Discussion|
|S3 Standby/Sleep not even available but S1 and S4 are?||General Discussion|
|Logoff/sleep freezes||General Discussion|