On 11/22/2024 3:47 PM, Stijn Sanders wrote:
> I've just recently upgraded to 6.3.3 and used the script wizard, selected
> my file association,
> selected to use #define's, but found one ".myp" that wasn"t replaced with
> my file extension, in the line:
>
> Root: HKA; Subkey:
> "Software\Classes\Applications\{#MyAppExeName}\SupportedTypes"; ValueType:
> string; ValueName: "*.myp*"; ValueData: ""
I was going to fix that hard-coded .myp, but now I'm puzzled as to why
that line exists at all.
It appears that the lines generated by the Script Wizard were copied
from this post:
https://groups.google.com/g/innosetup/c/TQeEXXkm9PA/m/F9GFkCczBAAJ
But there are other "Software\Classes\Applications" values at the top
that aren't included.
I tested the generated lines on Windows 11 without that SupportedTypes
key and everything seems to work fine. I created a file named
"test.myp", and Explorer immediately showed the correct icon. Didn't
have to open it or anything. And when right-clicking the file,
MyProg.exe is in the "Open with" list (it says MyProg.exe because the
EXE lacks version info).
The docs mention the SupportedTypes key on the "How to Exclude an
Application from the Open With Dialog Box for Unassociated File Types" page:
https://learn.microsoft.com/en-us/windows/win32/shell/how-to-exclude-an-application-from-the-open-with-dialog-box-for-unassociated-file-types
But if I'm reading the page correctly, that's only a problem you have to
worry about when you already have an Applications key:
"By default, any application registered as a subkey of
HKEY_CLASSES_ROOT\Applications is presented in the Open with dialog box.
These applications are presented in Open with regardless of whether the
application is registered to handle the file type."
So this line is creating a new Applications key, which creates the
problem, then creating the SupportedTypes subkey to fix the problem it
just created...?
-JR