I would like to reboot a set of machines each night. If possible I want the applications to have time to cleanly exit. Will
shutdown /f allow applications to exit and, if need be, kill them on a timeout? Or will it just start killing processes?
First of all, if you want to reboot you will need
At shutdown there is a signal being send to the applications. I tested this with an editor open. I got a save message. It stayed there for 2 seconds after which the process was killed off (hard !!).
If your application does not need user interaction, it has 2 seconds. If it does need user interaction, and the user does nothing, the process is terminated.
If you want to change some of the time-outs you can try changing the registry keys found on this page and this page. I tried the WaitToKillAppTimeout and HungAppTimeout but it keeps terminating after 2-3 seconds.
Well, shutdown /f would do a forced shutdown not a reboot. I think that you would want shutdown /r /f which would force a reboot. It would send a kill command to the apps. What they do with the command would depend on the app.