windowsregistryinno-setupopen-with

Open With... context menu, different label for executables of same name


I have multiple versions of an application where the executable has always the same name, just the file's path is different. When installing I would like to create a entry in the Open With... context menu and add the app's version to the label.

While this question here:

Name program in the Open With... context menu

is essentially the same, the answer only eludes to the situation where the executable has a different name for each version and by writing a string value called FriendlyAppName into

[HKEY_CLASSES_ROOT\Applications\**YOUR PROGRAM HERE***.exe\shell\open]

you can set the label. Is there a procedure for my case where the executable has always the same name?

Thanks Markus


Solution

  • While the above mentioned question seems to hint at the possibility to specify the FriendlyAppName as a string, my tests didn't come to the right results and Microsoft's documentation seems to indicate that it needs to be a lookup into a file resource.

    Hence my current "solution" is to write to the HKCR\Local Settings\Software\Microsoft\Windows\Shell\MuiCache key and the associated value for my application as follows:

    [Registry]
    Root: HKCR; SubKey: "Local Settings\Software\Microsoft\Windows\Shell\MuiCache"; ValueData: "{#MyAppNameLong} Build {#MyAppVersion}"; Flags: uninsdeletevalue; ValueType: string; ValueName: "{app}\bin\{#MyAppExeName}.FriendlyAppName"
    

    For now this works and I'm hoping that the Cache in the key name doesn't hint to this being rebuild out of the blue by windows...