Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In WiX, Should I have different Product Ids for 32 and 64 bit versions

I'm writing a WiX installer, with a common set of WiX sources for the 32 bit and 64 bit versions of the product.

The question is, should I use different Product Ids for the different versions?

like image 406
Tom Quarendon Avatar asked Sep 28 '11 15:09

Tom Quarendon


2 Answers

To answer my own question, which it turns out was actually the wrong one to ask, the MSDN documentation for the ProductCode property says:

The 32-bit and 64-bit versions of an application's package must be assigned different product codes.

Turns out I was confused by the fact that I thought that the product code should never change. This is wrong. Again:

The ProductCode property is a unique identifier for the particular product release. This ID must vary for different versions and languages.

like image 71
Tom Quarendon Avatar answered Oct 18 '22 14:10

Tom Quarendon


First I would make a guard like this for the 32 bit installer:

<Condition Message="This installer does not support 64-bit Windows! ">
  <![CDATA[NOT VersionNT64]]>
</Condition>

and this for the 64 bit installer:

<Condition Message="This installer does not support 32-bit Windows! ">
  <![CDATA[VersionNT64]]>
</Condition>

But back to your question. I recommend that you set Product Id to "*". This ensures that every build creates a new GUID. You can always find this GUID, if you want to create a patch, using Orca.

The important value is the UpgradeCode. This GUID creates a link between versions. I will recommend one UpgradeCode for all your 32 bit installers and another UpgradeCode for all you 64 bit installers.

like image 23
Morten Frederiksen Avatar answered Oct 18 '22 13:10

Morten Frederiksen