Remote Desktop + Sleep = ARGH!

Sovereign

2[H]4U
Joined
Mar 21, 2005
Messages
3,098
I know how to remotely wake a computer from sleep mode. I also know, thanks to this article how to put a computer to sleep over Remote Desktop. What I don't know is how to make Remote Desktop terminate after the client has been put to sleep.

If I try to "close" Remote Desktop after the remote machine has been put to sleep, it will do so eventually--while waking up the machine in question. Defeats the point. The only way I know that works is to use End Process on Remote Desktop after putting the machine to sleep. Or setting the remote machine to only wake with a magic packet, bu that demands another app to send said packet (RD doesn't do that). Any other ways to do this?

PS: For some reason, the "time-to-sleep" thing isn't working. What log(s) should I check in to see what's preventing Windows from idling to sleep on its own?
 
what about using the shutdown command with the -t flag? Try a -t 10, that will give you 10 seconds to close the RD window before it goes to sleep.

You can try powercfg to see if it can tell you why sleep isn't working. It's really powerful and has a million cmdline flags, so I couldn't tell you which one to use. Maybe powercfg -energy?

Edit:
Ahh, didn't notice that the shutdown command won't do sleep mode, how about this in a bat file?

ping -n 10 -w 1 127.0.0.1 > nul
%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState Standby

Right-click, run as admin. Will give you a 10 second delay before going into standby
 
Last edited:
Back
Top