1

I have a desktop application that automatically checks for updates on every start and automatically installs the update silently if one is available. I am using an .exe setup created with NSIS for that and do it with the following steps:

  1. While the app is running I move all application files to the temp folder
  2. I download and silently run the setup.exe file
  3. I restart my application and do a cleanup of the temp folder

This allows me to update the application while it is running. I would like to do something similar with a Wix .msi installer, but I am not sure if and how it is possible. I know there is a silent flag, but I believe .msi keeps track of all the files it has installed so will this work anyway? Can I just do the same thing with an .msi installer or how would one generally handle this? Is it maybe even possible to put all this logic directly inside the installer?

Johannes Stricker
  • 1,701
  • 13
  • 23
  • 1
    [Maybe have a quick read here on "Restart Manager"](https://stackoverflow.com/a/50935008/129130) - a bit down the page. Essentially your application should shut itself down gracefully and be capable of restarting itself. The whole idea is to restart applications and not have to reboot / restart Windows itself. You are not on a terminal server - are you? (many user logins possible). – Stein Åsmul Jun 30 '20 at 11:17
  • Thank you, I'll look into that. – Johannes Stricker Jul 02 '20 at 19:03
  • 1
    Maybe this Advanced Installer article can help you get a scope of things? There is a lot of text in that link above, this one is terser: [How do I add support for Windows Restart Manager to my application?](https://www.advancedinstaller.com/user-guide/qa-vista-restart-manager.html) - it is both technical and practical - which is nice to "hit the ground running". – Stein Åsmul Jul 02 '20 at 19:36

0 Answers0