Hi Jeremy!

I solved it this way:

Firstly I define a custom action for 32bit setup routine:

<?if $(var.ProcessorArchitecture)=x86 ?>
  <CustomAction Id="CA_Err32BitMsiOn64BitOS" Error="The 32-bit version of
this product cannot be installed on a 64-bit version of Microsoft Windows."
/>
<?endif ?>

Secondly I call the custom action in the 32bit setup routine whenever it is
called on a 64bit machine:

<InstallExecuteSequence>
  <?if $(var.ProcessorArchitecture)=x86 ?>
    <Custom Action="CA_Err32BitMsiOn64BitOS" After="LaunchConditions">
      <![CDATA[MsiAMD64 OR Intel64]]>
    </Custom>
  <?endif ?>
  ...
</InstallExecuteSequence>

<InstallUISequence>
  <!-- Only schedule this custom action for the 32-bit MSI.
-->
  <?if $(var.ProcessorArchitecture)=x86 ?>
    <Custom Action="CA_Err32BitMsiOn64BitOS" After="LaunchConditions">
      <![CDATA[MsiAMD64 OR Intel64]]>
    </Custom>
  <?endif ?>
  ...
</InstallUISequence>

To be honest I did not invent this by myself. I found this solution in a
blog. Unfortunately I cannot remember the URL of the blog any more.

Hope this helps.

Kind regards,
Rainer.


-----Ursprüngliche Nachricht-----
Von: Jeremy Lew [mailto:j...@liquidmachines.com] 
Gesendet: Montag, 26. Jänner 2009 21:49
An: General discussion for Windows Installer XML toolset.
Betreff: [WiX-users] Prevent 32 bit MSI install on 64 bit OS

Before I resort to a CA that tries to call IsWow64Process(), is there
any other simple way to bail out if attempting to run a 32 bit installer
on a Win64 OS? (My product requires the 64 bit installer on a 64 bit OS)

Thanks,
Jeremy

----------------------------------------------------------------------------
--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to