Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.bat sleep from RDP shutting down instead of sleep

Status
Not open for further replies.

Ubentobox

Technical User
Apr 22, 2011
24
US
Hi everyone,
So I am trying to make an easy solution to a off the cuff problem. I have an end user who only sometimes does not need his machine to be running during the weekends. But we need the option to turn on the machine as needed.
Currently I set the machine to Wake-On-Lan which works fine, but since he usually uses it the power settings are set to high performance (never sleep). I added to his desktop a one-liner .bat he can doubleclick when remoted in if he feels he does not need the machine and can put it in sleep mode.
We tested the Wake-On-Lan and the sleep.bat individually, but when he is RDPd into the box and runs the sleep.bat, it actually fully turns the machine off instead of sleep mode. Any suggestions?
Code:
rundll32 powrprof.dll,SetSuspendState
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top