The Windows Restart Manager (introduced in Windows Vista) supports gracefully shutting down and restarting applications that registered for restart with the RegisterApplicationRestart API.
This functionality is used by Windows Update – thanks to the Restart Manager, when I come yawning to my desktop PC in the morning, even following a system restart, I have my Outlook, browser windows, OneNote, Visual Studio, and Messenger all lined up as they were when I went to bed.
Suppose you want to initiate one of these “automagically restart everything after restart” restarts. As of a few weeks ago, I had it in my head that you have to write a small app that uses the Restart Manager APIs (e.g. RmStartSession and RmShutdown) to do this.
And then it hit me that the shutdown command must have support for doing this. And indeed, it has:
shutdown /g
Good post.
Is there a way to get a list of all the “Registered Applications”?
Yes install ARR Explorer (http://james-ross.co.uk/projects/arr) and you will see a list of registered apps. Unfortunately, my most used app, Notepad, yet doesn’t register for ARR.
Tried this. The only app that restarted was outlook, which is set to start automatically anyway. So I ended up with 2 copies of Outlook running, but *none* of my other apps restarted. It’s now 2015 and it seems almost no apps actually utilize this feature. Or am I missing something?
@Marc, I think it is because almost no one knows about this API. I have looked several times in the past to find out what “shutdown /g” means and this is the first time I came across this post. No other resource explains what a “Registered application” is.
Pingback: What is the Difference Between “shutdown /r” and “shutdown /g” in Windows?
Your response does not convey general understanding. Please explain what it does in plain English. Most users aren’t programmers and don’t know what APIs are, and even if they did, it doesn’t explain what it does and when to use it in a general understanding.
Most Windows users know what restarting the computer does.
Why would one use this feature instead of a shutdown /r, and how does it differ from a normal restart?
In which case would one use this. I read your explanation three times and still do not understand.
This is a blog for developers, so I’m just writing for my target audience. In any case, applications on Windows (such as Word, Outlook, Chrome etc.) can register so that when the system restarts, they are also restarted. When you use `shutdown /r` this doesn’t happen; when you use `shutdown /g`, it does.
Pingback: What is the Difference Between “shutdown /r” and “shutdown /g” in Windows? | | Gadget Gura
This is the very informative post. Thanks for sharing this article.