0
<?if $(var.Platform) = x64 ?>
  <Launch Condition="VersionNT64 AND (NOT NativeMachine = 43620)" Message="Please run 32-bit installer." />
<?elseif $(var.Platform) = x86 ?>
  <Launch Condition="NOT VersionNT64" Message="Please run 64-bit installer" />
<?elseif $(var.Platform) = ARM64 ?>
  <Launch Condition="VersionNT64 AND (NativeMachine = 43620)" Message="Please run ARM64 installer" />
<?endif?>

But here its getting messed up with the NativeMachine variables.

I tried to change the code of NativeMachine according to this. But looks like the wix installer is not picking up the NativeMachine properly. How do I specify each of the platforms so that the installer installs properly.

1 Answer 1

0

You can use the simplest.

<!-- Installer bitness matches OS bitness. -->
<?if $(var.Platform) = x64 ?>
<Condition Message="!(loc.Windows64Required)">
    <![CDATA[Installed OR VersionNT64]]>
</Condition>
<?endif ?>

<?if $(var.Platform) = arm64 ?>
<Condition Message="!(loc.Windows64Required)">
    <![CDATA[Installed OR VersionNT64]]>
</Condition>
<?endif ?>

<?if $(var.Platform) = x86 ?>
<Condition Message="!(loc.Windows32Required)">
    <![CDATA[Installed OR not VersionNT64]]>
</Condition>
<?endif ?>

Copied from here.

  • The ARM64 package fails nicely on Windows x64.
  • Windows ARM64 is happy to take either x64 or ARM64. I don't think it is necessary to verify further. Even if you have that need, you can do it in your main executable.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.