Script to restart Win 7

Plug-in and third party software discussion.
Post Reply
webuser
Posts: 3
Joined: Wed Mar 13, 2013 2:15 pm

Script to restart Win 7

Post by webuser »

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?
therube
Posts: 4953
Joined: Thu Sep 03, 2009 6:48 pm

Re: Script to restart Win 7

Post by therube »

Drop to a C: prompt, then type:

SHUTDOWN /?

Both the /r & /g command line options talk about restarting (though I have not attempted it).
daspud
Posts: 102
Joined: Wed Apr 01, 2009 3:15 am

Re: Script to restart Win 7

Post by daspud »

also check out Wismo on www.grc.com in Freeware, Utilities. And check out the whole site.

It does lots of interesting things.
alibiagent
Posts: 1
Joined: Wed Aug 07, 2013 9:33 am

Re: Script to restart Win 7

Post by alibiagent »

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.
Post Reply