Bat file sleep command windows 7




















I use a batch file to start up a few of the programs I need running in the background. Up until now, I had used the pause command to execute it after some of the other start-ups finished. I would prefer to use the wait or sleep commands but they do not appear to be included in Windows 7.

Anybody know how to put those commands back in, or a different method that achieves the same results? There are many sleep utilities you can download and drop into your System32 folder, one is provided with the Windows Server Resource Kit called sleep. This utility accepts a timeout parameter to wait for the specified time period in seconds or until any key is pressed. It also accepts a parameter to ignore the key press.

If you have Python installed and added the install path to your environment variable , you can let Python do the sleeping with something like:. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Ask Question. Asked 12 years, 3 months ago.

Active 1 year, 5 months ago. Viewed k times. Improve this question. Cegorach Cegorach 1 1 gold badge 6 6 silver badges 9 9 bronze badges. Answered by:. Archived Forums. Windows 7 Miscellaneous. Use this forum to discuss miscellaneous issues that cannot be covered in any other Windows 7 forum.

Sign in to vote. 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.

Similarly, you can create a log verification script and run it as soon as system wakes up from sleep mode. Your email address will not be published. This site uses Akismet to reduce spam. Learn how your comment data is processed. Home Windows.



0コメント

  • 1000 / 1000