penderi
penderi

Reputation: 9073

Wix - replacing seperate 32bit and 64-bit MSIs with one newer 32-bit MSI

Background

We have a 64 and 32 bit version of an 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.

Upvotes: 2

Views: 288

Answers (2)

Stein Åsmul
Stein Åsmul

Reputation: 42136

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

Upvotes: 2

Stein &#197;smul
Stein &#197;smul

Reputation: 42136

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).

Upvotes: 1

Related Questions