79466120

Date: 2025-02-25 10:12:41
Score: 1.5
Natty:
Report link

To expand on @Logaritm's answer, you can do this entirely in WiX 3.14 - it has to be 3.14 because the behaviour was specifically added at that version.

  1. Install WiX 3.14
  2. Open your WiX project in Visual Studio and add a Reference to WixUtilExtension, loading the dll from the C:\Program Files (x86)\WiX Toolset v3.14\bin folder
  3. Add this exact element <PropertyRef Id="WIX_NATIVE_MACHINE"/> as a child of the <Product> parent in the wxs file.
    During installation, msiexec will run a custom action that assigns a value to WIX_NATIVE_MACHINE.
  4. Add <Condition> items to your wxs files, e.g.
    <Condition>WIX_NATIVE_MACHINE = "43620"</Condition>
    The following link lists the possible values of WIX_NATIVE_MACHINE in hex - image-file-machine-constants - WiX understands decimal so you'll have to do the conversion.
Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): @Logaritm's
  • Low reputation (0.5):
Posted by: Brian THOMAS