News Focus
News Focus
icon url

Alloycon

03/13/05 10:24 AM

#53479 RE: Tiger64 #53366

window washing pro...

or

application for automatic reboot

I use the scheduler to periodically run the executable program called shutdown.

shutdown /L /R /Y /C

When run, the local machine (/L) will reboot (/R) answering "Yes" (/Y) to the question "Are you sure you want a shutdown?[Y/N]" that appears normally when executing the shutdown.exe command. It will also force all open applications to close (/C), without the opportunity to save any work. By the way, turn on auto save in your applications, or make sure that you close them when you finish daily work...

It's in the Windows/system32 folder.

In older systems you can use the at command in the same location.

The switches for shutdown include:

Shutdown . exe
\\Computer Specifies a remote computer to shut down.
/L Specifies a local shutdown.
/A Aborts a shutdown.� This is only possible during the timeout period.� This switch overrides all other switches.
/R Specifies that the machine should reboot after shutdown
/T:xx Specifies the time in seconds to count down before shutdown (20 second default).
"Msg" Specifies a message to appear during count down.
/Y Answers "Yes" to the question "Are you sure you want a shutdown?[Y/N]"
/C Forces all running applications to close.