Basic MSI Installer. My installer need to be able to run on both 32 and 64 bit machines, thus the Template Summary has to be set to "Intel".

I have two versions of a particular DLL that needs to be installed, one is 64 bit and one is 32 bit. They both have the same name. I condition the installation of the component containing the 64 bit dll to VersionNT64 and the 32 bit one to "Not VersionNT64". These DLLs need to be installed into the System32 folder. On a 32 bit machine this works fine. But on a 64 bit machine the 64 bit DLL gets installed into the SysWOW64 folder, which is of course the folder for 32 bit components. To make matters worse it is a COM object and needs to be registered.

How can I ensure the 64 bit DLL is installed into the System32 folder on a 64 bit machine? I cannot flag the component as "64 bit component" because the installer won't build, complaining that I have to target a x64 or Intel64 platform. But if I do that the installer won't run on a 32 bit platform (I presume) and needs to.