Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I don't believe you will be able to have a single MSI that will support both platforms. You will need to create one for x86 and another x64 - the good news is that you don't need to maintain another WiX project to achieve this.</p> <p>The way I've done this in the past is to have the following at the beginning of your product definition.</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"&gt; &lt;?if $(var.Platform)=x64 ?&gt; &lt;?define msiProductId = "102F7DF4-19A6-4d3d-987F-FF57A2031593" ?&gt; &lt;?define win64Flag = "yes" ?&gt; &lt;?else ?&gt; &lt;?define msiProductId = "8AE46CAF-220F-4B9F-9527-D4A19A27C45B" ?&gt; &lt;?define win64Flag = "no" ?&gt; &lt;?endif ?&gt; &lt;Product Id="$(var.msiProductId)" Name="My Product" Language="1033" Version="1.0.0" Manufacturer="Acme" UpgradeCode="E2575E4A-A62E-4460-B96D-B722C79C8EAA"&gt; &lt;Package InstallerVersion="400" Compressed="yes" InstallPrivileges="elevated" Platform="$(var.Platform)" /&gt; &lt;!-- Rest of product definition goes here --&gt; &lt;/Product&gt; &lt;/Wix&gt; </code></pre> <p>I forget where I got the advice to use a different ProductID for each platform.</p> <p>I created the 'win64Flag' variable to get other WiX elements to work nicely in the cross-platform scenarios. As an example, here's how you use it to make a single RegistrySearch definition work for both platforms and should resolve the issue you are having with locating the 12-hive hierarchy.</p> <pre><code>&lt;Property Id="WSE12DIRECTORY"&gt; &lt;RegistrySearch Id="Reg_WSE12DIRECTORY" Type="raw" Root="HKLM" Key="SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0" Name="Location" Win64="$(var.win64Flag)" /&gt; &lt;/Property&gt; </code></pre> <p>With all this in place, then it is just a case of passing the relevant value for the 'Platform' pre-processor variable on the <a href="https://en.wikipedia.org/wiki/WiX#Candle" rel="nofollow noreferrer">Candle</a> command-line, or selecting the target platform in Visual Studio.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload