Dhoni
Dhoni

Reputation: 1234

How to update WPF application that was deployed using Windows installer technology

I have followed this blog for deploying my WPF application. I used windows installer technology classic setup project template in Visual Studio 2015.

I am using windows installer instead of ClickOnce deployment because I need to choose my own installation path and custom wizard UI.

But there is not information regarding how to update my application when I use windows installer to deploy my application. How can I update my app after once it was installed in clients machine? Are there different possible ways to achieve this?

It would be helpful if anyone can provide the resources or suggest any practical approaches that I can use to update my WPF app.

Upvotes: 4

Views: 2423

Answers (1)

PhilDW
PhilDW

Reputation: 20800

In Visual Studio setups you use the RemovePreviousVersions project property. This should help:

https://www.simple-talk.com/dotnet/visual-studio/updates-to-setup-projects/

Basically just increment the setup project version, accept the changes, keep UpgradeCode the same, set RemovePreviousVersions to true.

The project's properties window is shown when you select the setup project in Solution Explorer and use F4, or View=>Properties Window, NOT property pages.

You'll also need to increment the file versions of files you wish to be updated.

If you want to do it silently, use the msiexec command line options that include /q, such as msiexec /I [path to your new msi] /q

However if your install requires elevation it will fail because silent really means silent, so the usual request for elevation will not be shown.

Upvotes: 2

Related Questions