Windows 7 Sleep/Suspend: How to execute a batch file before Sleep
I have a batch file on a machine (Machine A) that when I wake it up from sleep it utilizes the utility psshutdown which wakes up another machine (Machine B) on my network. This part works without fail. What I would like to do is when I put the machine (Machine A) to sleep, right before it sleeps, send a command using psshutdown to put the other machine (Machine B) to sleep as well. Unfortunately, every time I try to execute this the machine (Machine A) will fall asleep before the script is done executing and never puts the machine (Machine B) to sleep. Is there a way to either wait for the script to finish before it puts Machine A to sleep or just delay sleep for x amount of time? Thanks in advance for your response.
July 29th, 2010 6:05pm

Hi, Based on my research, this seems cannot be realized via batch file. You can check if this can be done by script. Check it in Script Center. Or you can post a thread on Script Center Forum.Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
August 4th, 2010 11:53am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics