我正在尝试添加第二个 .ico 文件以将其用作与我的应用程序关联的文件的图标。一段代码:
[Registry]
Root: HKCR; Subkey: ".tc65"; ValueType: string; ValueName: ""; ValueData: {#DispatcherName}; Flags: uninsdeletevalue;
Root: HKCR; Subkey: {#DispatcherName}; ValueType: string; ValueName: ""; ValueData: {#MyAppName}; Flags: uninsdeletekey;
Root: HKCR; Subkey: "{#DispatcherName}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},1"
Root: HKCR; Subkey: "{#DispatcherName}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1"""
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
据我了解,这条线
Root: HKCR; Subkey: "{#DispatcherName}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},1"
说对关联文件使用第二个图标。如何使用已知路径创建此图标?在 [Icons] 部分尝试了几个变体,但没有成功。
也许我应该在编译之前为 exe 添加一个图标?