Prevent to install 32 bit WIX installer on x64 using PROCESSOR_ARCHITECTURE Enviroment variables of WIX -


I have a Wix setup MSI for both 32-bit and 64-bit platforms.
I want to stop it from installing 32 bit MSI on 64 bit OS and 64 bit MSI on 32 bit OS.
However WIX prevents 32-bit MSI from installing MS-bit MSI, but I have to get reverse too.

I was using the code below: -

  & lt; If $ (var.Platform) = x86? & Gt; & Lt; Condition message = "Setup x64 can not be installed on the machine." & Gt; & Lt ;! [CDATA [Installed or not VersionNT64]] & gt; & Lt; / Status & gt; & Lt ;? Endif & gt;  

But this is displayed on the welcome page of my MSI. I want to receive messages when installing 64bit MSI like 32 bit OS such as

The installation package is not supported by this processor type. Contact your support personnel

How can I get it?

This condition should work! I am thinking that the variable platform is not being set properly.

You can also try (which is as high as yours):

   

Edit : I deleted the platform = x64 condition after the @ Christopher Painter comment because you receive it for free on x64 msis. I also tried the code above and it works.


Comments