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
Contact:

Script to restart Win 7

Post by webuser » Fri Mar 15, 2013 9:16 pm

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: 2379
Joined: Thu Sep 03, 2009 6:48 pm

Re: Script to restart Win 7

Post by therube » Fri Mar 15, 2013 11:14 pm

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 » Tue Apr 02, 2013 12:06 am

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 » Wed Aug 07, 2013 9:38 am

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