Jump to content

Win7 hibernate resume


Recommended Posts

The windows API are mostly backwards compatible so I'm guessing the code should work...

However I believe there have been some problems with the windows 7 sleep/hibernate feature... for example-

http://gizmodo.com/5133399/win-7-tip-sleep...te-your-machine

http://www.windows7taskforce.com/view/979

http://mydellmini.com/forum/vista/794-wind...oesnt-work.html

http://social.technet.microsoft.com/Forums...19-85a9db02b0b6

Which may have some contribution to your problem...

What exactly does the code do when you run it? any errors or does literally nothing happen?

Link to comment
Share on other sites

It hibernates but will not resume. However there are no problems if I try to hibernate/resume manually. This is why I think it has something to do with the API.

I noticed Win7 uses new API: SetWaitableTimerEx (http://msdn.microsoft.com/en-us/library/dd405521(VS.85).aspx) and CreateWaitableTimerEx. The previous SetWaitableTimer has 'BOOL fResume' parameter that can be set to TRUE to resume the machine. However, SetWaitableTimerEx removes this fResume parameter and replace it with WakeContext. Iam not really sure how to use this new parameter to resume the system. Any idea?

Edited by swi
Link to comment
Share on other sites

  • 3 weeks later...

It turns out that the script I linked to in the fist post using windows API does work. As eviltoaster said the API is backwards compatible. But there is a new Advanced Power Option in Win7 under the 'Sleep' category called 'Allow Wake Timers'. By default it is set to 'disable', which is what caused the script to fail. This option does not exist on Vista or XP.

Now I just have to find some way to change this option through automation. My intention is to have this autmation run on various computers with unknown configurations. Powercfg is not yet able to modify this setting as far as I'm aware, so I was going to export a working powerplan and then import it onto computers when the script is run.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...