相关文章推荐
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I'm trying to associate a filetype with my program with Inno Setup 5.5.4 (u). This somehow does not work: no program is associated to my extension and no icon in being shown in explorer.

Note that when copying the registry values found in regedit and pasting them into explorer, the icon and the program open, respectively.

Here is my code, nearly identical to the one present in the Inno FAQ .

[Registry]
Root: HKCR; Subkey: ".wcalc"; ValueType: string; ValueName: ""; ValueData: "{#MyAppName}"; Flags: uninsdeletevalue
Root: HKCR; Subkey: "{#MyAppName}"; ValueType: string; ValueName: ""; ValueData: "BHKW-Calc Datei"; Flags: uninsdeletekey
Root: HKCR; Subkey: "{#MyAppName}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\icon.ico,0"
Root: HKCR; Subkey: "{#MyAppName}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1"""

Any idea of what could be wrong?

And have you set the [Setup] section directive ChangesAssociations to yes as suggested ? You have to do that otherwise the system won't be notified about the Shell changes and those changes will be seen only if some program send this notification or after you re-logon to the system. – TLama Nov 21, 2013 at 11:19 Yes TLama, I have ChangesAssociations=yes in [Setup]. I even try restarting, but it had no effect. – Nicolas Nov 21, 2013 at 11:25 P.S. even if you do that, I have noticed on a few systems, that Explorer didn't hear that notification and shown the icons in newly opened windows only after you closed all its currently opened windows. I've noticed that mostly in Windows 7, but a few people reported this on Windows XP as well. But that's the Windows issue and should not affect the program association change (just its visual representation). – TLama Nov 21, 2013 at 11:27 The association is not done: double-clicking on the .wcalc file brings the Open With dialog. – Nicolas Nov 21, 2013 at 11:28 Sorry for the late answer, TLama. I now understood that my installation script actually works on all machines except one: mine. I've had many previous installations of my program and therefore also many association. The program changed name, etc. Something blocked the process - which key exactly is still unknown to me. Anyway, problem is "solved". Thanks a lot - once a again - for your quick and efficient help! – Nicolas Nov 27, 2013 at 12:19

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.

 
推荐文章