dbostream
dbostream

Reputation: 811

WiX prevent x86 and x64 side-by-side installation

In the past we have only provided an x86 version of our tool suite but starting with the next release we also want to provide an x64 version for a subset of our tool suite. I have updated our MSI-project to build one version for x86 and one for x64. The MSI-files contain the following:

I want to prevent the x86 and x64 MSIs from being installed side-by-side on an x64 platform. How do I do that? Or am I taking the wrong approach when providing x86 and x64 versions of our product? I guess I could include a condition in the x86 MSI that won't allow it to be installed on an x64 platform but is this considered bad?

Atm both MSIs share the same UpgradeCode (I read this is a good idea if we previously have relased only an x86 version and want it to be upgraded by both the x86 and x64 version of the latest release) and ProductCode and PackageCode are both set to *.

I appreciate any help.

Upvotes: 0

Views: 424

Answers (2)

Christopher Painter
Christopher Painter

Reputation: 55581

FWIW, I would give each MSI a different UpgradeCode. Your x64 install can have an Upgrade table entry to remove the x86 UpgradeCode if you want x64 to supersede x86.

You might also want to consider a burn bootstarpper to handle x86 vs x64 so that your users don't have to think about which is the right choice. I don't know how big your MSIs are though.

Upvotes: 1

PhilDW
PhilDW

Reputation: 20780

You could would have the x64 setup write a registry entry in the 32-bit regisry saying effectively "I'm installed" with whatever other information would be useful, and use a search and a launch condition. Or make the UpgradeCodes different - they are different product lines anyway - and use an Upgrade element in the x86 setup to search (UpgradeVersion OnlyDetect) for the UpgradeCode ofthe x64 version.

That would prevent x86 after x64 install, but wouldn't prevent the x86 from being installed first, but for that you can include the x86 UpgradeCode in the x64 install so that the x64 install will upgrade and remove the x86 one.

To prevent the x86 install on x64 a launch condition such as 'Not VersionNT64' should work - the docs say VersionNT64 is defined only on x64 OS systems.

Upvotes: 1

Related Questions