I have a Wix Setup msi for both 32 bit and 64 bit platform.
I want to prevent it to install 32 bit msi on 64 bit OS and 64 bit msi on 32 bit OS.
Although WIX prevent to install 64 bit msi on 32 bit msi but i want to achieve reverse also.
I was using the below code :-
<?if $(var.Platform)=x86 ?>
<Condition Message="Setup can not be installed on x64 machine.">
<![CDATA[Installed OR Not VersionNT64]]>
</Condition>
<?endif?>
but it display at the welcome page of my msi. I want to display the message same as i get when i install 64 bit msi on 32 bit os such as
The Installation Package is not supported by this processor type.Contact your support personnel
How can i achieve this?
That condition should work! I'm thinking maybe the variable Platform is not being set properly.
You could also try this (which is pretty much the same as yours):
<?if $(var.Platform) = x86 ?>
<Condition Message="Setup can not be installed on x64 machine.">
<![CDATA[Not VersionNT64]]>
</Condition>
<?endif?>
Edit: I removed the Platform=x64 condition after @Christopher Painter comment because you get that for free on x64 msis. I also tried the code above and it works.