Aaron Posted August 12, 2003 Share Posted August 12, 2003 Earlier, a member in this forum asked if he could use shutdown.exe instead to restart the computer. I told him that he couldn't because it isn't a command that exists in Windows. I was wrong!It exists on Windows XP, and I stupidly tried it on Windows 2000 just to verify it exists. d'oh! Anyway, you can get a full list of commands to use by typing shutdown /? in Command prompt. The only switches you will probably only need to use is:shutdown.exe -r -f -t 60 -r = Reboot-f = Force Applications to terminate-t 60 = timer of 60 seconds before rebooting/shutdown, the numbers can be edited to your preference.Anybody willing to test this on a system without a Network card, or a system with no network card drivers installed? The reason I ask is because PsShutdown is non-functional on a system without a NIC or NIC drivers. Link to comment Share on other sites More sharing options...
DaveXP Posted August 12, 2003 Share Posted August 12, 2003 AaronXP i have a litte app which can shutdown the computer with or without a network card it lets you set the time to shutdown and also lets you put a message in to it and also it can be stop.Have a look that this.Download If you can work this is may be more helpful. Link to comment Share on other sites More sharing options...
mortis42 Posted August 12, 2003 Share Posted August 12, 2003 I have a questions about using the -f and -t switches together. Does this force applications to terminate immediatly, or at the end of the timer? Or does it activate the switch in order they are typed?Would "shutdown.exe -t 60 -f" wait 60 seconds then force app terminate?Would "shutdown.exe -f -t 60" force apps to terminnate then shutdown in 60 seconds?Doesn't using the -f switch defeate the purpose of waiting a minute to let the installs finish updating shortcuts, ect.? Link to comment Share on other sites More sharing options...
DaveXP Posted August 12, 2003 Share Posted August 12, 2003 shutdown.exe -r -f -t 60 this will shutdown the computer and restart it after 60 all programs are shutdown after the timer is finshed counting down. Link to comment Share on other sites More sharing options...
devil270975 Posted August 12, 2003 Share Posted August 12, 2003 Aarron: thanks for the mention and you dont need to put .exe after shutdown nor do you need to use the -f switch, and i am so glad i proved everyone wrong...lol... Link to comment Share on other sites More sharing options...
devil270975 Posted August 12, 2003 Share Posted August 12, 2003 Oh yeah i forgot, no you do not need a network card or anything else....so no need to download psshutdown anymore just do it from the command lineLee Link to comment Share on other sites More sharing options...
devil270975 Posted August 12, 2003 Share Posted August 12, 2003 Another thing you, if you would like to stop the reboot is use another cmd script with just this line SHUTDOWN -a and copy it to the desktop and if you want to cancel the reboot just click on this when the counter has stopped, in other words SHUTDOWN -a cancels out SHUTDOWN -r -t 60 once it has started Link to comment Share on other sites More sharing options...
DaveXP Posted August 12, 2003 Share Posted August 12, 2003 yer we no you can use that command to stop the RPC flaw in windows shutdown.exe -a =abort Link to comment Share on other sites More sharing options...
devil270975 Posted August 12, 2003 Share Posted August 12, 2003 Did you also know then that you can add the -c switch at the end to add a comment/message? SHUTDOWN -r -t 120 -c "Restarting computer in 2 minutes" Link to comment Share on other sites More sharing options...
devil270975 Posted August 12, 2003 Share Posted August 12, 2003 This is the official xp site for it, it has all the switches, and believe me there are a fewhttp://www.microsoft.com/windowsxp/home/us...en/shutdown.aspLee Link to comment Share on other sites More sharing options...
darkkavenger Posted August 12, 2003 Share Posted August 12, 2003 It sounds like the good'ole UNIX shutdown ;-) Link to comment Share on other sites More sharing options...
bisco2k Posted August 12, 2003 Share Posted August 12, 2003 LMAO ive known those commands for a while now, sorry lads if i would have known i would have posted this before for the unattended xp setup, been using them from day 1 Link to comment Share on other sites More sharing options...
Aaron Posted August 12, 2003 Author Share Posted August 12, 2003 For someone who asked about the -f switch in conjunction with the timer, it terminates applications when the timer reaches zero, no matter which order the switches are in. Link to comment Share on other sites More sharing options...
jquintino Posted August 12, 2003 Share Posted August 12, 2003 works i simple use SHUTDOWN -rand restart my machine in 30secsgreat more space in the disk to put more thingsif you want to now all comamds go to the help of xp and type shutdown Link to comment Share on other sites More sharing options...
danielvh Posted August 16, 2003 Share Posted August 16, 2003 So how exactly do you integrate this into the batch file?Just copy SHUTDOWN -r -t 60 -c "Restarting computer in 1 minute"to end of batch file?Before "EXIT"?Any ECHO's needed before or after?(Yes I know im a n00b )ThanksDaniel Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now