2013-04-04 65 views
2

我正在研究一个.NET分析器(我的项目输出是一个DLL)。我已经构建了2个DLL(用C++编写):一个将由x86 .NET进程加载,另一个由x64加载。我想生成一个单一的MSI(目标x86格​​式),检查操作系统是64位还是32位。然后注册正确的DLL,即:MSI - 有条件注册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 

这可能吗?

回答

5

MSI平台不支持混合32/64位安装程序。有创建'混合'MSI的黑客,但它没有官方支持。 Microsoft建议的方法是创建2个或更多MSI(通用,32位提供程序,64位提供程序),然后使用引导程序(如WiX Burn或InstallShield Suite安装程序)为最终用户提供单一安装体验。