2

Background

We have a 64 and 32 bit version of an MSI:

  • app.msi
  • app_x86.msi

these have been created with Wix and have separate upgradeCodes defined for each MSI.

We also have a WIX bundle EXE that decides on which MSI to use according to platform.

The Problem

The 64-bit version no longer exists, we want ALL upgrading clients (MSI or EXE, 32 ot 64-bit) to use the 32-bit version.

I guess I need 2 MSIs still, each with matching the old upgrade codes, 1 for 32-bit and 1 for 64-bit but will identical content....

Ideally I'd have 1 MSI have can upgrade 2 different upgradeCodes but I guess that's not possible.

I hope the above is clear.... we've tried : - produce a single 32-bit dll (app_x86.msi) - copy to matche the previous 64 bit (app.msi) - ensure both MSIs have the same upgrade code as before

And yet we end up with a side-by-side install.

penderi
  • 8,673
  • 5
  • 45
  • 62

2 Answers2

2

Adding another answer since I need code formatting. This Wix sample seems like a pretty good basic start.

I don't have this machine set up properly for testing this XML code, but something like this should work:

Upgrade table entry for X32:

<Property Id="PREVIOUSVERSION_X32" Secure="yes" />

<Upgrade Id="YOUR_GUID_X32_EDITION">  
   <UpgradeVersion 
      Minimum="1.0.0" Maximum="99.0.0" Property="PREVIOUSVERSION_X32" 
      IncludeMinimum="yes" IncludeMaximum="no" />
</Upgrade>

Upgrade table entry for X64:

<Property Id="PREVIOUSVERSION_X64" Secure="yes" />

<Upgrade Id="YOUR_GUID_X64_EDITION">  
   <UpgradeVersion
      Minimum="1.0.0" Maximum="99.0.0" Property="PREVIOUSVERSION_X64"
      IncludeMinimum="yes" IncludeMaximum="no" />
</Upgrade> 

Here is a snapshot of how a similar upgrade scenario might be implemented in the compiled MSI file: enter image description here

Community
  • 1
  • 1
Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • Well you're doing an amazing job of scooping up my votes! thanks so much. I'll up vote, try this morning and will throw as many votes/points/prizes at you when I've got it working. You star! – penderi Jun 13 '14 at 07:17
  • 1
    Just remember to test this well since I didn't compile and test it, and run tests also with the same setup trying to reinstall itself. Never a substitute for the real testing after compilation. Some people like to allow an older setup to uninstall older versions, whereas others use a downgrade protection mechanism. This is all possible using the standard Upgrade table. Avoid custom actions at all costs - generally there is a better, built-in way. – Stein Åsmul Jun 13 '14 at 13:03
  • Thank you. We've now got the impossible - 32-bit upgrade of a 64-bit app. I'm minimised our installs and even managed to bootstrap an EXE in our MSI. Magic! – penderi Jun 16 '14 at 09:09
1

You can add several upgrade codes to the upgrade table and uninstall them as part of your install. See this sample too.

An upgrade code identifies a "family of products" (or technically a number of product codes that match the upgrade code) and each entry in the upgrade table will define a common upgrade strategy for all of the product codes that match that particular upgrade code.

In other words you can just add the two different upgrade codes to your upgrade table, author the remaining fields and this should work. You probably need two ActionProperties. Remember to add them both to the SecureCustomProperties. I believe Wix takes care of this automagically. If this isn't done the PUBLIC property values are not passed from the client to the server installation process on secure client PCs (which is most PC's with newer Windows versions) and X-files problems result. The client process runs with interactive user rights, and the server process runs with LocalSystem (full system access).

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • DUDE! That's it. Now I'm struggling to find a good example (I find the Wix doco either hard to find or lacking in reasonable examples). I may be looking in the wrong place... do you have an example with the upgrade table? – penderi Jun 12 '14 at 15:33
  • In particular I'm trying to translate the above linked MSI doco with Wix - is is the Upgrade and UpgradeVersion – penderi Jun 12 '14 at 15:41