Hi Brian
My first thought is to launch (start) a second script that will just launch a count down for x number of seconds or minutes based on the number of seconds
This may keep the machine from going back to sleep. This will launch every time your parent script launches, when it completes the secondary script will still be running counting down to keep the machine "active"
Other links
Radia - General Discussions
Wake from Sleep and Keep Awake During Radia connect
I want to let our users have the option to connect their laptops from home over their internet connection at night. I already use a scheduled task to wake the computers from sleep to start a connect, however, what I did not realize until recently is that the computer goes back to sleep as soon as my script ends (and I stop my script after I fire the connect). I thought Windows would just stay awake until the "sleep after x minutes" is reached. However, that is not how it work out of a scheduled task. Does anyone have a solution for this already? I am also concerned about keep the machine awake through multiple reboots, etc during the connect.
Previous 6 commentaires
Hi Billy, I did try that. However, regardless of what else is running on your machine (the Radia connect could be right in the middle of a download), as soon as the original script that launched the task closes, the machine will go right back to sleep. (This is Windows 7 I am working with BTW).
Hi Brian,
I have found a way to control the power options through the command line using the windows "powercfg" command line. Please see below link.https://technet.microsoft.com/en-us/library/cc748940(v=ws.10).aspx
Please check this out to see if this will work for you. Maybe you can turn off Sleep mode prior to connect then reinstate after the connect has completed.
Please note that I have not tested this command
Thanks Brian
Billy
@Jamshed, I have considered PowerCfg scheme, but it seems a little too much work (I like to keep everything simple). But, it may be the answer. However, I had not thought about the WAIT parameter on RADNTFYC. That actually may work. I will have to get it some more thought and testing. Thanks! BTW, I did find out from our team that we currently keep the machine awake if it is on AC power. So, it is possible, I don't really have do anything for most of our users. It could be a training thing. It is only the scenario if they put the machine to sleep themselves before they plug it in.
Simples, doesn't even need packages.
Create two new ZSERVICES.
POWERCFG_HIGH
ZSVCPRI 1
ZCREATE c:\windows\system32\powercfg -s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
ZVERIFY c:\windows\system32\powercfg -s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
POWERCFG_BALANCED
ZSVCPRI 99
ZCREATE c:\windows\system32\powercfg -s 381b4222-f694-41f0-9685-ff5bb260df2e
ZVERIFY c:\windows\system32\powercfg -s 381b4222-f694-41f0-9685-ff5bb260df2e
Assign both services to the machine.
During a connect POWERCFG_HIGH will switch power mode to High performance as the first ZSERVICE to be processed.
At the end of the connect POWERCFG_BALANCED will switch power mode back to balanced.
Participate
Ask, Discuss, Answer





