wix - Detect if 32 or 64 bit windows and define var -


i want install visual c++ 2012 redistribute app. install appropriate version based on architecture of machine. eg

if platfrom x86     vcredist_filename = microsoft_vc120_crt_x86.ms else     vcredist_filename = microsoft_vc120_crt_x64.ms 

ive tried accomplish in many differents ways cant working. ive tried:

    <?if $(var.platform) = x64 ?>         <?define vc120redist_filename="microsoft_vc120_crt_x64.msm" ?>     <?else ?>         <?define vc120redist_filename="microsoft_vc120_crt_x86.msm" ?>     <?endif ?>      (undefined preprocesss variable "platform").      <?if $(var.versionnt64) ?>         <?define vc120redist_filename="microsoft_vc120_crt_x64.msm" ?>     <?else ?>         <?define vc120redist_filename="microsoft_vc120_crt_x8.msm" ?>     <?endif ?>       (undefined preprocesss variable "versionnt64").      <?if ![cdata[versionnt64]] ?>         <?define vc120redist_filename="microsoft_vc120_crt_x64.msm" ?>     <?endif?>       (unexpected literal ![cdata[versionnt64]]) 

i use 2 separate components conditions this:

<component id="foo" guid="{guid}" win64="yes">    <condition>     <![cdata[versionnt64 or $(var.platform) = "x64"]]   </condition> </component>  <component id="bar" guid="{guid}">   <condition>     <![cdata[not(versionnt64) or $(var.platform) = "x86"]]   </condition> </component> 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -