- Aug 30, 2004
- 2,519
- 1
- 81
Ok here's the deal. I Hibernate my laptop every night at 11:45 pm via a ScheduledTask which runs this command: rundll32.exe powrprof.dll,SetSuspendState S4(this is the Hibernate state switch). You might ask "Why don't you just close the lid or push the power button". Well I usually go to bed around 11:00 and I like to have Winamp streaming music for a half hour or so to help me sleep. Then the computer hibernates. The task works perfectly.
Ok so that is why I use a ScheduledTask to hibernate the computer. I also use a ScheduledTask to wake the computer and me. That way when I get up the computer is ready to go. My wake the computer task justs runs a Notepad document called Reminder.txt. It is just reminder notes for me. This task is set to "use this task to wake the computer"(checkbox is checked)......this task does Not run as scheduled. Every morning to get the computer out of hibernation I have to resort to using the power button then the task runs. Why doesn't it run as scheduled? I believe this article explains why:
.........http://msdn.microsoft.com/en-us/library/aa373201.aspx.......... Is this article relevant?
Both tasks are created using my passworded Administrator account. I posed this question over a year ago on Aumha.net and one of the MVP's on the site gave me a work around by using Shutter.exe(http://www.den4b.com/screenshots.php?project=Shutter). If I use Shutter instead of rundll32.exe powrprof.dll,SetSuspendState S4 to hibernate my laptop all tasks run correctly including wakeup tasks.
In fact for the past year or so I haved used Shutter but I would like to just use Rundll32.exe instead.
In that article I linked to it clearly shows when invoking the SetSuspendState function there is a parameter that if True will
DisableWakeEvents and I believe that is what is happening here.
How do I make sure the DisableWakeEvent parameter is not set to True and at least eliminate that as the problem.
Ok so that is why I use a ScheduledTask to hibernate the computer. I also use a ScheduledTask to wake the computer and me. That way when I get up the computer is ready to go. My wake the computer task justs runs a Notepad document called Reminder.txt. It is just reminder notes for me. This task is set to "use this task to wake the computer"(checkbox is checked)......this task does Not run as scheduled. Every morning to get the computer out of hibernation I have to resort to using the power button then the task runs. Why doesn't it run as scheduled? I believe this article explains why:
.........http://msdn.microsoft.com/en-us/library/aa373201.aspx.......... Is this article relevant?
Both tasks are created using my passworded Administrator account. I posed this question over a year ago on Aumha.net and one of the MVP's on the site gave me a work around by using Shutter.exe(http://www.den4b.com/screenshots.php?project=Shutter). If I use Shutter instead of rundll32.exe powrprof.dll,SetSuspendState S4 to hibernate my laptop all tasks run correctly including wakeup tasks.
In fact for the past year or so I haved used Shutter but I would like to just use Rundll32.exe instead.
In that article I linked to it clearly shows when invoking the SetSuspendState function there is a parameter that if True will
DisableWakeEvents and I believe that is what is happening here.
How do I make sure the DisableWakeEvent parameter is not set to True and at least eliminate that as the problem.