Search code examples
windowssystem-shutdown

Restarting applications with shutdown.exe


According to the help for shutdown.exe, the /g switch does the following

/g         Full shutdown and restart the computer. After the system is
               rebooted, restart any registered applications.

I noticed that when I use this switch, not all the applications in use prior to the system shutdown are restarted.

So my question is this: is there a limit to the number of applications that can be restarted or is it that I don't understand the meaning of the term 'registered'? I suspect the latter to be case and would appreciate some guidance.


Solution

  • /g will restart any application that registered itself with the RegisterApplicationRestart API UNLESS the application was forcefully terminated. So, if you don't allow enough time /t for the application to gracefully save and close, it will not restart.