title: Inno Setup 32bit and 64bit dll installation
body: <p>If the OS is 64bit I want to install a 32bit DLL to the <code>Program Files (x86)</code> folder and 64bit DLL to <code>Program Files</code> folder and register them respectively. If it is a 32bit OS I just want to copy the file to the normal program folder and register. </p>
  
  <p>How can I do this in Inno Setup? Also will the 64bit DLL be registered by the 64bit <code>regsvr32</code> program?</p>
  
  <p>Here is my code so far. It works fine on 32bit OS but on 64bit OS it dumps both set of files in the <code>Program Files (x86)</code>. </p>
  
  <pre><code>[Files]
  Source: D:\..\32bit files\mylibrary.dll; DestDir: {app}; \
      Flags: restartreplace ignoreversion regserver 32bit
  
  Source: D:\..\64bit files\mylibrary.dll; DestDir: {app}; \
      Flags: restartreplace ignoreversion regserver 64bit; Check: IsWin64
  </code></pre>
  
  <p>I have looked at the <code>64BitTwoArch.iss</code> example but that tells how to do a 32bit OR 64bit install not a 32bit AND 64bit install.</p>