Jump to content

Windows XP Restart


Recommended Posts

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


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

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

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

:)

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

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

Thanks

Daniel

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...