Inno Setup UninstallIcon 消失

问题描述

我使用这段代码的 UninstallerIcon 有问题:

UninstalldisplayIcon=....(Iconlocation)

然后当我拔下带有图标的磁盘时,图标消失了:

enter image description here

enter image description here

我希望你能帮我:)

此致,

基督徒

解决方法

UninstallDisplayIcon 必须指向目标机器上的永久文件。不是安装程序的源驱动器。这通常意味着您必须安装图标并将 UninstallDisplayIcon 指向已安装的副本:

[Setup]
UninstallDisplayIcon={app}\uninstall.ico

[Files]
Source: uninstall.ico; DestDir: {app}

请注意,UninstallDisplayIcon 是由目标计算机上的 Windows 加载的,而不是 Inno Setup 本身。除了 .exe 之外,Windows 还支持其他格式,例如 .dll.ico