MSI - 有条件地注册DLL

Kir*_*ira 2 c++ windows-installer atl visual-studio-2010

我正在研究.NET Profiler(我的项目输出是一个DLL).我已经构建了2个DLL(用c ++编写):一个将由x86 .NET进程加载,另一个由x64加载.我想生成一个MSI(目标x86模式),检查操作系统是64位还是32位.然后注册正确的DLL,即:

 - Project output : - the_x64.DLL
                    - the_x86.DLL
 - A single MSI that targets x86 machines : contains the 2 DLLs
                    - if the OS is 64 bits then both of the DLLs are registered
                    - if the OS is 32 bits then only the x86 dll is registered
Run Code Online (Sandbox Code Playgroud)

那可能吗?

Chr*_*ter 5

MSI平台不支持混合32/64位安装程序.有些黑客可以创建"混合"MSI,但它并没有得到官方的支持.Microsoft推荐的方法是创建2个或更多MSI(通用,32位提供商,64位提供商),然后使用WiX Burn或InstallShield Suite安装程序等引导程序为最终用户提供单一安装体验.