How to do major upgrades when using burn / WiX 3.6
Asked Answered
E

1

15

I have one MSI setup like this:

<Product Id="*" ... UpgradeCode="4207FF3B-5E0D-4311-9DFC-B41AA8DE2965" />
    <MajorUpgrade DowngradeErrorMessage="Can't downgrade" />

It works as expected:

  1. Install product
  2. Recompile (effectively generating a new Id)
  3. Starting the new msi file brings up the change view and I can repair or uninstall the product.

Good. But then comes burn.

I have created the most simplistic Bundle one can thing of. I use the standard bootrapper and just add one single MsiPackage:

<MsiPackage SourceFile="$(var.Setup.TargetPath)" />

The problem is that after each recompile I can install the product once again beside the already installed product, without changing anything! This results in duplicate ARP entries!

If I don't recompile and run the bundle exe-file twice, I get the modify setup screen as expected. What can I do to have the same behaviour with burn as I had with just an MSI?

Eutectoid answered 20/7, 2012 at 3:36 Comment(0)
S
8

Increment the bundle version number and Burn will upgrade the previous version and remove it.

Scuffle answered 21/7, 2012 at 5:38 Comment(6)
Yes, thank you. But is there really no way of preventing a side-by-side installation without incrementing the version number? I'd like to have the same behaviour as with the MSI package.Eutectoid
The bootstrapper application can override the default no-op behavior by changing the request state in OnPlanRelatedBundle.Scuffle
What would you override the request state to for this to work? Present?Undesigning
Yes, BOOTSTRAPPER_REQUEST_STATE_PRESENT.Scuffle
Where is OnPlanRelatedBundle located? How can you hook into it?Pieeyed
@BobArnson Is that the burn source code you're hinting at editing? Is there no way of getting this behavior without modifying the source code? That would be so troublesome when upgrading WiX versions...Pieeyed

© 2022 - 2024 — McMap. All rights reserved.