Installing your component to C:\Windows\System32
seems like a bad idea in general: that folder is owned by the OS and isn't intended for the installation of user programs.
That said, you're probably being bitten by file system redirection: when a 32-bit program access C:\Windows\System32
, it's actually redirected to C:\Windows\SysWOW64
. If your installer is 32-bit, it's not actually writing your 64-bit component to the folder you expect. When your 64-bit app runs, it tries to find the component in the "real" System32
folder and fails to find it.
I would recommend installing the two different versions of your component to x86
and x64
subfolders of a new folder under %ProgramFiles%
.