Tom Quarendon
Tom Quarendon

Reputation: 5708

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?

Upvotes: 6

Views: 815

Answers (2)

Morten Frederiksen
Morten Frederiksen

Reputation: 5165

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.

Upvotes: 3

Tom Quarendon
Tom Quarendon

Reputation: 5708

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.

Upvotes: 6

Related Questions