Major upgrade on a multi-instance installer

279 Views Asked by At

I'm reluctant to ask this question at this time, as I repeat WiX - Doing a major upgrade on a multi instance install... Yet I hope my question will get answered :)

I have an installer with multiple instances:

<Product Id="{GUID}" UpgradeCode="{GUID}" Version="!(wix.Version)" Name="MyProduct" Manufacturer="MyCompany">

  <MajorUpgrade Schedule="afterInstallExecute" DowngradeErrorMessage="A newer version of [ProductName] is already installed." />

  <Property Id="INSTANCEID" Value="Default" />
  <InstanceTransforms Property="INSTANCEID">
    <Instance Id="I01" ProductName="MyProduct_I01" ProductCode="{GUID}" UpgradeCode="{GUID}" />
    <Instance Id="I02" ProductName="MyProduct_I02" ProductCode="{GUID}" UpgradeCode="{GUID}" />
    .
    .
    .
    <Instance Id="I49" ProductName="MyProduct_I49" ProductCode="{GUID}" UpgradeCode="{GUID}" />
    <Instance Id="I50" ProductName="MyProduct_I50" ProductCode="{GUID}" UpgradeCode="{GUID}" />
  </InstanceTransforms>
</Product>

For the sake of clarity, every new version uses:

  • A different version number (different in at least one of the first 3 numbers)
  • A different product code for each instance
  • The same upgrade code for each instance
  • I install each product with domain admin privileges

Before changing the product code every new release I used the same one for each version, and though it was a bit clumsy (retaining deleted components forever), the re-install process worked out.

Now, however, subsequent re-installations using different versions make msiexec.exe see all the components as missing, thus failing the installation. It looked as if it was time to transition to major upgrades!

Upgrading the naïve way

msiexec.exe /i "installer.msi" /n {OLD_VERSION_PRODUCTCODE}

Prompted a false message:

The system administrator has set policies to prevent this installation.

Upgrade via re-install

msiexec.exe /i "installer.msi" /n {OLD_VERSION_PRODUCTCODE} REINSTALL=ALL REINSTALLMODE=vamus

(also tried with REINSTALLMODE=amus since a new product is a new install, but nope)

Logged each component as absent and didn't touch any file (the upgrade was reported successful):

Installed: Absent; Request: Null; Action: Null

I'm at a loss -- what am I missing?

1

There are 1 best solutions below

0
On BEST ANSWER

I found an awkward solution, but it's only fit for an awkward problem:

<SetProperty Id="REINSTALL" Value="" Before="AppSearch" />
<SetProperty Id="REINSTALLMODE" Value="" Before="AppSearch" />

By unsetting the REINSTALL properties I somehow skip over the major upgrade permission hurdle and avert a real re-installation, leaving me with the new version.

I will happily accept a more orthodox solution, specifically one that doesn't involve fiddling with Windows Installer properties...