Load unistall icon from exe file in the inno setup

两盒软妹~` 提交于 2019-12-24 04:43:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!