From what i've read it looks like that is no parameter that allows you to change the uninstall icon:
[Setup]: UninstallIconFile
Description:
Obsolete in 5.0.0. As Setup and Uninstall have been merged into a single executable, setting a custom icon for Uninstall is no longer possible.
So, is there another way to change this icon?
I'm asking because if, for example you have only your launch exe, an readme and the uninstall, users may accidentally click on the uninstall instead of lauch, which is a little bit annoying.
Thanks.
Your Uninstall Icon would only be the same as your application icon if you set the IconFilename
setting to the same icon as the application or have the SetupIconFile
setting set to the same as your application.
By default, the Uninstall Icon is the same as the Setup icon. If you really want to make sure the user isn't confused, you can set the IconFilename
parameter in the [Icons]
section to your uninstall icon. Something like:
Name: "{group}\Uninstall My Program"; Filename: "{uninstallexe}"; IconFilename: "{app}\uninstall.ico"
You would need to include the uninstall.ico in your [Files]
section as well.
To change the uninstall executable icon, you have to change the installer executable icon, as it is the same exe, using the SetupIconFile
setup section directive.
For example:
SetupIconFile=MyProgSetup.ico
You can also change the Icon that is displayed on the control panel, setting the UninstallDisplayIcon
setup section directive
For example:
UninstallDisplayIcon={app}\MyProg.exe,4
;or
UninstallDisplayIcon={app}\Uninstaller.ico
Set the uninstaller icon as SetupIconFile
, then change the resource icon in the compiled .exe. (There are many programs to do that like the ResHacker)
If you see the compiled .exe still with the uninstaller icon, just move that .exe to another folder and you will notice.
The "setup.exe" file icon can be set by SetupIconFile
The control panel icon can be set by UninstallDiaplayIcon
In script file, I added these lines to the [Setup]
section:
[Setup]
.
.
.
; Icons for setup.exe and control panel
UninstallDisplayIcon={app}\Icon.ico
SetupIconFile="Icon.ico"
Note that:
UninstallDisplayIcon
is given {app}
path
SetupIconFile
uses absolute path, because the setup program to be created by Inno (by compiling) is yet to have {app}
before my program is installed.
jachguate's answer has given me the best clue to figure out my case. This solution is tested on a few Windows 10 computers.