NextPVR Forums

Full Version: Batch file access to "standby" and "restart" features
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I know I have asked this before, but I am really quite desperate: I want very much to simulate Slimm-GBPVR's "standby" function from a batch file. Every CLI I've used to enter standby either overrides Slimm's "delayed standby" trapping, or will not restart for recordings, or both. Slimm's works perfectly, but I have to do it manually with my mouse.

Come on, genius community...there's got to be a way.
any 'user intiated' suspend command will go straight to suspend...it's MS fault....
but to do it myself, i just add the cmds i want to do before suspend, in batch file before the suspend cmd...
i believe you can do the normal windows supend from batch file like:
Code:
powercfg -h off
ping 1.1.1.1 -n 1
%windir%\system32\rundll32.exe PowrProf SetSuspendState
powercfg -h on
[you have to temporarily turn off hibernate mode then pause a sec., then issue cmd, then turn it back on real quick before suspend happens..]

so just run your needed cmds before running the suspend cmd in the batch file you kick off to start suspend mode...make sure it'll wait for you processes to finish before continuing..
[start /w "" cmds]

hope that helps a bit..Big Grin
pBS Wrote:any 'user intiated' suspend command will go straight to suspend...it's MS fault....
i believe you can do the normal windows supend from batch file like:
"rundll32.exe powrprof.dll,SetSuspendState FALSE,FALSE,FALSE"

Unfortunately, using the dll this way causes a problem. I can't remember which one: it either suspends regardless of whether there is a recording in progress (Slimm-GBPVR does not intercept it), or it suspends so thoroughly that the machine does not wake up for the next recording.

One problem or the other occurs with every program I've tried: nircmd, sleep.exe, etc.