00 Votes

Windows Batch Script for restarting the Computer

Question by Guest | 2013-11-03 at 11:13

I would like to include a restart or reboot into one of my batch scripts for my Windows computer. Some actions are executed in the script and after this, the computer should be restarted.

Is this somehow possible or is it not possible to effect the system in such a manner through a simple batch script?

0Best Answer0 Votes

Yes, that is possible. Just add the following line into your batch script:

%SYSTEMROOT%\system32\shutdown.exe -r -t 0

This opens the program shutdown.exe which is responsible for shutting down or restarting your computer. The parameter "-r" makes the restart, "-t 0" makes it happening after a delay of 0 seconds, so just in the moment.

More information about this process, I have put into this little tutorial.
2013-11-03 at 15:37

ReplyPositive Negative

Related Topics

How to edit a Batch Script

Question | 1 Answer

Batch Script is not working

Question | 1 Answer

Abort Windows Batch Script

Question | 1 Answer

What is a Batch Script?

Question | 1 Answer

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.


Ask your own question or write your own article on askingbox.com. That’s how it’s done.