0

I have up until now been using my own restart application utility.

But I now see that there is a dedicated restart manager since Vista.

This is useful for me because I now limit my application to Windows 7 or higher.

Currently, I offer a manual restart when the user changes the application language.

Also, after they have downloaded an updated installer (Inno Setup) it shuts the app down and starts the setup program.

I can't work out how to do these thing with the MFC restart manager. It mentions about adding one line of code to my MFC app and how to simulate scenarios. But what about my specific situations?

If you can please direct me to a good tutorial?

Sorry if my question is off topic and I will remove.

Jabberwocky
  • 48,281
  • 17
  • 65
  • 115
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
  • The [Restart Manager](https://msdn.microsoft.com/en-us/library/windows/desktop/cc948910.aspx) is intended to restart an application that **unexpectedly** has shut down. It is not applicable in case of a manual or planned shutdown. To add Restart Manager support to an MFC application, follow the steps under [How to: Add Restart Manager Support](https://learn.microsoft.com/en-us/cpp/mfc/how-to-add-restart-manager-support). – IInspectable Aug 03 '17 at 16:30
  • 2
    @IInspectable According to https://blogs.msdn.microsoft.com/vcblog/2009/02/18/mfc-restart-manager-support-in-vs2010/ it states: "It can help applications maintain their data **when an update needs to shutdown the application** or when an unexpected software error or crash occurs." Also, InnoSetup directly supports the shutting down and restarting of a app that is "RestartManager" aware. So it doesn't seem to be **just** for crash purposes. – Andrew Truckle Aug 03 '17 at 17:21
  • *"when an update needs to shutdown the application"* is still unexpected from the point of view of the application. It is taken down by a facility external to the application. The first link I posted points to instructions on how to implement the features you are looking to use, in particular [Using Restart Manager with a Primary Installer](https://msdn.microsoft.com/en-us/library/windows/desktop/aa373681.aspx). – IInspectable Aug 03 '17 at 20:30
  • @iinspectable I think I will just use what I have. I have a small app restarted exe file that waits for mine to close and restarts it. Thanks again. – Andrew Truckle Aug 03 '17 at 20:56

0 Answers0