Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should the WIX UpgradeCode be different between an x64 and an x86 version of a product?

Tags:

64-bit

wix

I'm assuming YES.

I have an installer for the x86 version, I'm building the installer for the x64 version.

I'm trying to figure out the gotchas. So far it looks pretty straightforward. I feel like they ought to be different UpgradeCodes. I'll need to check for the VersionNT64 property within a Condition to validate the install.


<Condition Message="This package can be installed only on an x64 version of Windows.">
  VersionNT64
</Condition>

Any other hints?

like image 908
Cheeso Avatar asked Jan 11 '11 14:01

Cheeso


1 Answers

I would go ahead and say that yes you should probably have different upgrade codes for the two installers unless you have a specific need for them to be the same.

One scenario I can think of where matching upgrade codes may be useful is if you have previously shipped only a x86 version that was able to install on both 32-bit and 64-bit operating systems. In such a case, having a x64 version with the same upgrade code would allow you to easily handle upgrades from the older x86 to the new x64 version on 64-bit operating systems.

Edit:

I forgot to mention that you can also use the "Msix64" property to determine bitness. It's also unnecessary to add an install condition to the x64 version, since attempting to install it in a 32-bit OS will result in an error message from the Windows Installer service.

Currently I only use one condition in the x86 version of the installer

<Condition Message="You are attempting to install the x86 version in a 64-bit OS">NOT Msix64</Condition>
like image 161
Douglas Mendizábal Avatar answered Oct 11 '22 14:10

Douglas Mendizábal