(Batch) How to shutdown a computer using a batch file - Printable Version +- howtothings.co.uk (https://www.howtothings.co.uk) +-- Forum: Computing (https://www.howtothings.co.uk/forumdisplay.php?fid=4) +--- Forum: Programming Support, Graphic Design and Tutorials (https://www.howtothings.co.uk/forumdisplay.php?fid=14) +--- Thread: (Batch) How to shutdown a computer using a batch file (/showthread.php?tid=7) |
(Batch) How to shutdown a computer using a batch file - Mark - 22-05-2010 How to shutdown your computer using a batch file. STEP ONE: The shutdown command is used to make a computer turn off, reboot or log off. STEP TWO: To make a computer shutdown you type: shutdown -s STEP THREE: To make a computer log off you type: shutdown -l STEP FOUR: To make a computer reboot you type: shutdown -r STEP FIVE: To stop a computer from shutting down you type: shutdown -a STEP SIX: You may of noticed that the default time for these commands is 30 seconds, but you can change it. To change the time from 30 seconds you type: shutdown "what you want the computer to do" -t "ammount of time in seconds". Where it says "what you want the computer to do" replace that with either -s, -l or -r. STEP SEVEN: To force a computer to shut down (Cannot be cancelled) you type: shutdown "what you want the computer to do" -f The "-f" simply forces all running applications to close. I hope this has helped. |