问题
I have all of my icons in my executable file. If I want to change the uninstall icon of my program which is shown in Start Menu, I can easily do that by:
[Files]
Source: "icons\uninstall.ico"; DestDir: "{app}\Icons"
[Icons]
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; IconFilename: "{app}\Icons\Uninstall.ico"
Since I have Unistall.ico in my exe file, I want load the icon from it, but the below line doesn't do that and causes no icon is displayed in the Start Menu > My Program Folder
[Icons]
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; IconFilename: "{app}\{#MyAppExeName},5"
Whats wrong? Thanks
回答1:
",5" is not a valid part of the filename. Replace it with this:
IconFilename: {app}\{#MyAppExeName}; IconIndex: 5
(Assuming of course that you do have at least 6 icon resources in your application.)
来源:https://stackoverflow.com/questions/17446600/load-unistall-icon-from-exe-file-in-the-inno-setup