Usher
Usher

Reputation: 2146

How to upgrade the MSI package if the previous version of the application is open at the moment

I have a quite weird scenario: I have a WPF application installed using my previous MSI (Ver 1.0), I modified my application and created new MSI (ver2.0). When I install the new MSI(Ver 2.0) and the application is not open then it updates the old msi(ver 1.0) quite smoothly.

When the application is open, update pops up the message: "The application is running do you want to close". Is it possible not to pop up the message and to do a silent update instead even if an old application is open ?

Upvotes: 2

Views: 235

Answers (1)

Christopher Painter
Christopher Painter

Reputation: 55571

What tool are you using to write your MSI? You can write a custom action to close the app or send a message telling the app to close. Schedule this early enough so that MSI doesn't detect a running app.

You can also research the "restart manager" functionality that exists in recent versions of Windows / Windows Installer that provides a very nice integration to stop, upgrade and restart restoring the state of the application. Nice stuff.

Upvotes: 2

Related Questions