title: Inno Setup: Disabling components based on PC architecture
body: <p>I'm using Inno Setup with two components: one for 32-bit machines and one for 64-bit. These will run on XP/Vista/Win7.</p>
  
  <pre><code>[Components]
  Name: Bin/32; Description: 32-bit; Types: full; Flags: dontinheritcheck
  Name: Bin/64; Description: 64-bit; Types: full; Flags: dontinheritcheck
  </code></pre>
  
  <p>Currently:</p>
  
  <ul>
  <li>Both Components are ticked by default when running the installer.</li>
  </ul>
  
  <p>What I want is:</p>
  
  <ul>
  <li>An appropriate default (i.e. either 32-bit or 64-bit ticked) depending on the user's machine. </li>
  <li>Greying out the inappropriate Component would be a bonus too.</li>
  </ul>
  
  <p>What I've found so far is:</p>
  
  <ul>
  <li>That I probably want to use Pascal in the [Code] section.</li>
  <li>The IsWin64 function</li>
  <li>That I might want to use an Event for this, but I can't find anything related to my needs yet.</li>
  </ul>
  
  <p>P.S. Unfortunately I'm not able to have separate installers per architecture.</p>