2
votes

I'm using wix Bundle to install chain of Msi's , When i'm trying to upgrade the older version is not uninstalling

please help me on doing below any of the scenarios

  1. How can i uninstall the previous version before install the latest version
  2. Always upgrade to the latest version, In My case it can be major release or minor release or patch release
2
If you implement windows installer major upgrades in the bundled msi you don't have to uninstall before installing a newer version. Also of note, the wix bootstrapper will properly upgrade versions that only differ in the 4th portion of bundle version. For a wix bundle to upgrade properly their versions must be different and they must share the same UpgradeCode - Brian Sutherland

2 Answers

2
votes

There's more to it then just uninstalling. First of all let's take a look at your versioning. The bundle itself has version and each of msis has its own version. I hope that when there's time for upgrade you have to upgrade the entire bundle without checking each of the packages separately, it might make it a bit easier. So now, each of MSIs should have Product > Upgrade attribute set and have Upgrade node. The values should be the same. Bundle should have attribute UpgradeCode. This should be enough for you to uninstall the previous version and install a new one.

Now, if you want to show something in the UI, you can go to your bootstrapper application and subscribe to all kinds of Detect events. There are some related to upgrade.

Here's the MSI that support update:

<Product Id="*" Name="$(var.ProductName)" Language="1033" Version="1.0.0.5" Manufacturer="$(var.Manufacturer)" Upgrade="GUID_HERE">
<Package InstallerVersion="450" Compressed="yes" InstallScope="perMachine" />
<Upgrade Id="SAME_GUID_HERE"/>

And burn:

<Bundle Name="$(var.ProductName)"
   Version="1.0.0.5"
   Manufacturer="$(var.Manufacturer)"
   UpgradeCode="ANOTHER_GUID"

So once you install packages with GUIDs inside, the next version will detect (using GUID) that product is installed already and will do an upgrade.

0
votes

In this way I was able to block the appearance of multiple bootstrapper windows. Eventually, no programs appears and we only see Msi. https://stackoverflow.com/a/62262418/12267227