I use this as a shortcut from my desktop to quickly shutdown.
C:\Windows\System32\shutdown.exe /f /s /t 0
Any ideas how to change it in order to function as restart?
Script to restart Win 7
Re: Script to restart Win 7
Drop to a C: prompt, then type:
SHUTDOWN /?
Both the /r & /g command line options talk about restarting (though I have not attempted it).
SHUTDOWN /?
Both the /r & /g command line options talk about restarting (though I have not attempted it).
Re: Script to restart Win 7
also check out Wismo on www.grc.com in Freeware, Utilities. And check out the whole site.
It does lots of interesting things.
It does lots of interesting things.
-
- Posts: 1
- Joined: Wed Aug 07, 2013 9:33 am
Re: Script to restart Win 7
I've been using the following to restart Windows, (XP, Vista, 7)
shutdown -r -f -t 01
Create a text file containing the above text, then save it as a batch file, (in the 'save' dialogue, change the dropdown box to "All Types" of files, and then add .bat to the end of the file name. The integer "01" indicates the amount of time before the shutdown operation begins. You can change it to anything you want up to 999 I believe.
NOTE: I find it very useful to have a script, (shutdown -a) on the desktop with a 'hotkey' programmed to execute it in case of an emergency halt of a shutdown process you did not initiate, or that you accidentally initiated.
shutdown -r -f -t 01
Create a text file containing the above text, then save it as a batch file, (in the 'save' dialogue, change the dropdown box to "All Types" of files, and then add .bat to the end of the file name. The integer "01" indicates the amount of time before the shutdown operation begins. You can change it to anything you want up to 999 I believe.
NOTE: I find it very useful to have a script, (shutdown -a) on the desktop with a 'hotkey' programmed to execute it in case of an emergency halt of a shutdown process you did not initiate, or that you accidentally initiated.