25

我有一个 Inno Setup 项目。一切都很好,但我在“程序和功能”控制面板区域中看不到应用程序图标。我确实在其他地方看到了这个图标。

脚本文件确实具有以下内容:

[Setup]
SetupIconFile={#MySetupImageIco}

是否需要设置其他内容才能使应用程序图标显示在“程序和功能”控制面板小程序中?我正在针对 Windows 8.1 进行测试。


更新:
根据评论,我尝试在我的脚本中设置:

UninstallDisplayIcon={#MySetupImageIco}

遗憾的是,这并没有在“添加/删除”又名“程序和功能控制面板”小程序中产生图标。


更新#2:
获胜的解决方案是:

UninstallDisplayIcon={app}\{#MyAppExeName}

当然,#define MyAppExeName "whatever.exe"脚本顶部必须有一个以上的。有趣的是,当我指定 ico 文件的路径时,我没有成功。Windows 8 和 8.1 的 Inno Setup 需要我刚才所说的。Windows 7 使用UninstallDisplayIcon并指定 ICO 的路径或不使用它,只是 Windows 8 和 8.1 有点不同。

4

5 回答 5

46

解决方案是:

添加

[Setup]
UninstallDisplayIcon={app}\{#MyAppExeName}

指定实际的 ico 文件不起作用,但是这个条目起作用了。

我针对 Windows 8/8.1 进行了测试。Windows 7 可以在没有这条线的情况下工作。

于 2014-01-03T13:44:40.207 回答
14

我也可以确认这是一个可行的解决方案(Win7 x64):

[Setup]
UninstallDisplayIcon={uninstallexe}

我在这里真正喜欢的是它独立于应用程序名称等。只是卸载程序的纯别名。

可在https://dutchgemini.wordpress.com/2011/05/03/innosetup-and-the-missing-uninstall-icon-on-windows-7找到

于 2016-03-02T18:15:19.793 回答
0

在 Windows 11 中,您可以使用图标文件本身。

UninstallDisplayIcon=C:\Path\to\ico\file 做这件事。

为我工作。

于 2021-12-30T07:06:12.857 回答
-1

添加

它应该是

UninstallDisplayIcon= {app}ForwardSlash{#MyAppExeName}

我针对 Windows 10 最新版本对其进行了测试。

于 2015-08-27T07:39:35.360 回答
-3

我对您的#MyAppExeName解决方案有疑问,因为我使用了该OutputBaseFilename指令。一个更优雅的解决方案是:

UninstallDisplayIcon={srcexe}
于 2017-05-02T14:04:18.360 回答