Restart Windows and Restart All Registered Applications: shutdown -g

August 14, 2011


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

Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



  1. JasonCFebruary 17, 2012 ב 4:49 PM

    Is there a way to get a list of all the “Registered Applications”?

  2. xpclientMarch 30, 2012 ב 10:48 AM

    Yes install ARR Explorer ( and you will see a list of registered apps. Unfortunately, my most used app, Notepad, yet doesn’t register for ARR.

  3. MarcJune 16, 2015 ב 11:36 PM

    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?

    1. ScottAugust 28, 2015 ב 4:53 PM

      @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.

  4. Pingback: What is the Difference Between “shutdown /r” and “shutdown /g” in Windows?

  5. chadOctober 14, 2016 ב 9:46 PM

    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.

    1. Sasha Goldshtein
      Sasha GoldshteinDecember 21, 2016 ב 11:00 AM

      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.

  6. Pingback: What is the Difference Between “shutdown /r” and “shutdown /g” in Windows? | | Gadget Gura

  7. Ross WestFebruary 2, 2018 ב 7:07 AM

    This is the very informative post. Thanks for sharing this article.