title: Detecting x86/x64 and installing correct .msi
body: <p>I am finalizing an application that will soon be submitted for Windows Logo Program validation.  One of the requirements is x64 compatibility.  Specifically, Crystal Reports 2008 must work under x64.</p>
  
  <p>My problem is that Crystal Reports basic 2008 (the one packaged with Visual Studio 2008) has no merge modules and must be installed using the provided .msi installers.  They offer separate installers for x86 and x64.</p>
  
  <p>So how would I detect x86 and x64 during install and then run the appropriate Crystal msi?  Is this even possible without merge modules?</p>
  
  <p>EDIT:  </p>
  
  <p>This:</p>
  
  <pre><code>IF PROCESSOR_ARCHITECTURE == x86 AND
     PROCESSOR_ARCHITEW6432 NOT DEFINED THEN
     // OS is 32bit
  ELSE
     // OS is 64bit
  END IF
  </code></pre>
  
  <p>seems to tell me how to detect it (thanks MicSim).  But how do I perform this in an MSI?  Is it a custom action?  And then how do I trigger different required msi's for the x32 and x64 crystal reports?</p>
  
  <p>And why doesn't the x86 crystal installer work under WOW64?  You have to install x64 Crystal to work with your WOW64 x86 app.  Frustrating...</p>
  
  <p>EDIT 2:</p>
  
  <p>Okay, so detecting x86/x64 seems to be covered here.  Now how about manually triggering an msi of your choosing?</p>