How can WIX based installers do COM registration for both 32 and 64 bit Windows OSes?

后端 未结 2 1387
南笙
南笙 2021-01-06 00:48

I have a long lived installer which is using RegistryValue to setup a .Net COM server. The installer is 32 bit. I would like to have the registry settings also set for 64 bi

2条回答
  •  暖寄归人
    2021-01-06 01:29

    I had the same problem with a custom Windows Shell Overlay Extension that must provide a 32-bit Dll for 32-bit Windows and a 64-bit Dll for 64-bit Windows. My 32-bit msi file would only write the registry entries to the WoW6432 node on the 64-bit system, so the shell extension didn't work.

    The solution (tested with wix-3.5.2519.0 on Win7 x86 and x64):

    1. Create two components, one will install only on a 32-bit System and the other one will only install on a 64-bit System.
    2. Use a 'Condition' element inside each Component to check for the bitness of the operating system. I used Msix64, it might also work with VersionNT64...
    3. The 64-bit Component must have the Win64 Attribute set to "yes".
    4. Unfortunately this will not work successfully out of the box because light.exe throws an error (error LGHT0204 : ICE80: This package contains 64 bit component but the Template Summary Property does not contain Intel64 or x64.):
    5. The solution is to run light.exe with the ICE80 check disabled (use parameter -sice:ICE80). Now the msi file will be generated and can be used on both platforms.

    Example:

    
        
         
        
        
            
        
    
    
    
        
         
        
        
            
        
    
    

    References:

    • http://jpassing.com/2009/10/09/mixing-32-and-64-bit-components-in-a-single-msi/
    • http://installing.blogspot.com/2006/04/msi-validation-in-wix.html

提交回复
热议问题