My app is associated with .XYZ
file extensions by an Inno setup program. As far as I can tell, the initial file association is created OK & works perfectly fine. (The correct icon is shown for associated files, double clicking them will launch the app, etc.)
The problem is that if a user manually messes up the file associations of my app, reinstalling the app doesn't seem to fix the problem.
For example, we had a user associate the .XYZ
extension of the app with a PDF reader (which is not at all a valid thing to do). It would be nice if simply reinstalling were a way for this to be fixed, rather than giving a user more complicated instructions. A lot of users would try reinstalling on their own in a situation like this anyway.
I think these are the relevant portions of the script:
[Setup]
...
ChangesAssociations = yes
...
[Registry]
Root: HKA; Subkey: "Software\Classes\{#AppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: {#MainIcon}
Root: HKA; Subkey: "Software\Classes\{#AppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#AppExeName}"" ""%1"""
Root: HKA; Subkey: "Software\Classes\Applications\{#AppExeName}\SupportedTypes"; ValueType: string; ValueName: ".XYZ"; ValueData: ""