PsShutdown & PowrProf.dll,SetSuspendState
Joined: 27 January 2012
Posted: 27 January 2012 at 8:34pm
I have a couple of questions about PsShutdown.
I wrote a custom batch file to put my computer into Standby using one of the different commands below.
start /min "" "C:\WINDOWS\System32\rundll32.exe" PowrProf.dll,SetSuspendState 0,0,0
start /min "" "C:\WINDOWS\System32\rundll32.exe" PowrProf.dll,SetSuspendState Standby, false, false
start /min "" "C:\WINDOWS\System32\rundll32.exe" PowrProf.dll,SetSuspendState Suspend, false, false
Using this any one of the methods above does put the computer into Standby, but any Scheduled Tasks that I have programmed to run WILL NOT run until I wake the computer manually. Then they run as soon as I wake it up.
The third flag being set to 0 or false, is supposed to enable wake events, but is not doing so.
And, yes, I have them enabled on all of the tasks that I want to run.
If I put the computer into Standby with the sleep button on my keyboard, or use PsShutdown with the command below, it works beautifully. It allows me to put my computer into Standby, and it WILL run all Scheduled Tasks.
psshutdown -d -t 0
So, here's my first question.
What is my computer's sleep button, or PsShutdown, doing differently to put the computer into Standby so that it works?
My second questions is,
Why doesn't PowrProf.dll,SetSuspendState work? Is there a glitch in the PowrProf.dll? Or are there registry settings that are overriding the PowrProf.dll,SetSuspendState flags that I set? If so, where in the registry are they?
Are they located in one of these locations perhaps?
I don't know if I'm on the right track or not, and even if I am, I don't know which bits of binary data to repair in those key values.
My third question is,
What is the difference between these PsShutdown switches?
-k Poweroff the computer (reboot if poweroff is not supported)
-s Shutdown without poweroff
I thought shutdown was always shutdown with power off? Shutdown without power off is Standby, isn't it?
Anyway, I'd really appreciate any answers to my questions.
Joined: 20 February 2013
I encountered the same results... powerprof.dll would not allow a Windows XP PC's scheduled task to wake the PC from standby mode. The research i did seemed to indicate the hardware did not support wake from standby mode (the lower S1 or S2 standby mode i think). I was never able to get a conclusive answer as to what standby mode powerprof.dll put a Windows XP into, but like i said, i think it's S1 or S2 rather then the more common S3.
In any case, i also switched to psshutdown to resolve the problem. Unfortunately psshutdown doesn't seem to properly notify the OS of the pending switch to standby mode. So there is no event log entry and my application which tracks power savings doesn't think the PC goes into standby mode. Considering the age of XP, you're not likely to get much out of Microsoft or anyone else at this point. I have legacy XP in our environment which should be gone by the end of 2013. So i'm just biding my time until XP is gone. Win7 seems to work fine.
|Forum Jump||Forum Permissions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum