在inno设置中从exe文件加载unistall图标 [英] Load unistall icon from exe file in the inno setup

查看:268
本文介绍了在inno设置中从exe文件加载unistall图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的可执行文件中包含了所有图标。如果我想更改开始菜单中显示的程序的卸载图标,我可以通过以下方式轻松完成:

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"

因为我有Unistall.ico在我的exe文件中,我想从中加载图标,但下面的行没有这样做,导致开始菜单>我的程序文件夹中没有显示图标

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

推荐答案

,5不是文件名的有效部分。替换为:

",5" is not a valid part of the filename. Replace it with this:

IconFilename: {app}\{#MyAppExeName}; IconIndex: 5

(假设您的应用程序中至少有6个图标资源。)

(Assuming of course that you do have at least 6 icon resources in your application.)

这篇关于在inno设置中从exe文件加载unistall图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆