How to register file types/extensions with a WiX installer?

后端 未结 3 1046
傲寒
傲寒 2020-11-30 05:32

I didn\'t find an explicit answer to this question in the WiX Documentation (or Google, for that matter). Of course I could just write the appropriate registry keys in HKCR,

3条回答
  •  情话喂你
    2020-11-30 06:10

    Unfortunately there's no way to do a "safe" association with Windows Installer.

    We just write everything out to the registry and then have a separate component that takes over the system-wide default and is only installed if no other application has already registered itself as the default.

    With Vista there's the new "default programs" interface, again you write everything out to the registry. Here's a complete example that we're using in our installer. (WiX 3.0)

    Update: 12 months have passed since my original answer and I have a better understanding of file associations. Rather than writing everything manually I'm now using proper ProgId definitions which improves handling for advertised packages. See the updated code posted in response to this question.

    
        
        
        
        
        
        
        
    
        
    
        
        
        
        
        
        
    
        
        
    
        
        
    
    
    
    
    
    
        
            
                
            
        
    
        
    
    

提交回复
热议问题