I created an application that can open image files. Now I'm creating an installer using the WiX Toolset. For the last couple of days, I am stuck with some misunderstanding: trying to register my app and associate it with desired extensions. Everything appears in the registry but none of my files open with my application, as if it was not installed.
This is the part where I describe the executable file and register all of the extensions for it:
<Component Id="CmpLightImageViewer.exe" Guid="{...}">
<File Id="MainExe" Name="LightImageViewer.exe" />
</Component>
<Component Id="CmpLightImageViewerProgId" Guid="{391FBC30-B5A1-4AB7-8FA4-254C1CE2BF69}" KeyPath="yes">
<ProgId Id="LightImageViewerSvg" Description="Light image viewer">
<Extension Id="svg">
<Verb Id="open" TargetFile="MainExe" Argument=""%1"" />
</Extension>
</ProgId>
<ProgId Id="LightImageViewerGif" Description="Light image viewer">
<Extension Id="gif">
<Verb Id="open" TargetFile="MainExe" Argument=""%1"" />
</Extension>
</ProgId>
...
</Component>
That is what I see in my registry HKCR. The same in HKCU/Software/Classes, but not in HCLM/Software/Classes:
What am I missing? What else do I need to do to make it work? While I can set file associations manually for each type using Windows tools, that's not how I want it to work.
I'm building it with vs2015 in windows10 using wix3.10
This is the sort of security feature started in Vista - Windows protects "default" associations, allowing the user to select them. If you want your program to be the "default" for handling existing file types, thus overriding user settings (this is exactly what this feature was supposed to prevent, as far as I understand), then you may take a look at this question for an example:
How to associate application with existing file types using WiX installer?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With