Is there a way in WIX that allows me to specify that a certain application should be treated as the default one when the user double clicks on a file with a certain extension?
For example, let's say I have an application A, whose installer sets the following association:
<ProgId Id="XYZFile" Description="App A file">
<Extension Id="xyz" ContentType="application/text">
<Verb Id="open" Command="Open" TargetFile="A.exe" Argument='"%1"' />
</Extension>
</ProgId>
And then I have application B that deals with the same extension and sets the following association:
<ProgId Id="XYZFile" Description="App B file">
<Extension Id="xyz" ContentType="application/text">
<Verb Id="open" Command="Open" TargetFile="B.exe" Argument='"%1"' />
</Extension>
</ProgId>
Is there a way to make app B the default one for the file extension specified, in the following scenarios:
- User installs app A, which associates the extension
xyz
with app A, then installs app B. In this case the desired behaviour is for app B to launch when the user double clicks on the file. - User installs app B, then installs app A. In this case the desired behaviour is for app B to launch when the user double clicks on the file. So installing app A does not overwrite the default file association.
- User uninstalls app B, file association defaults back to app A.
- User uninstalls app A, file association remains with app B.
I had several attempts at googling a similar requirement and solution, but so far haven't found a clear answer.