Uninstaller of one program uses icon of another program's uninstaller

167 views
Skip to first unread message

Antik Mozib

unread,
Jul 16, 2025, 9:31:34 PMJul 16
to innosetup
Consider the following two scripts:

Script 1
[Setup]
AppName=My Program 1
AppVersion=1.5
WizardStyle=modern
DefaultDirName={autopf}\My Program 1
DefaultGroupName=My Program 1
UninstallDisplayIcon={app}\MyProg.exe
Compression=lzma2
SolidCompression=yes
OutputDir=userdocs:Inno Setup Examples Output
SetupIconFile=green.ico
OutputBaseFilename=My Program 1 Setup

[Files]
Source: "MyProg.exe"; DestDir: "{app}"
Source: "MyProg.chm"; DestDir: "{app}"
Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme

[Icons]
Name: "{group}\My Program 1"; Filename: "{app}\MyProg.exe"


Script 2
[Setup]
AppName=My Program 2
AppVersion=1.5
WizardStyle=modern
DefaultDirName={autopf}\My Program 2
DefaultGroupName=My Program 2
UninstallDisplayIcon={app}\MyProg.exe
Compression=lzma2
SolidCompression=yes
OutputDir=userdocs:Inno Setup Examples Output
SetupIconFile=red.ico
OutputBaseFilename=My Program 2 Setup

[Files]
Source: "MyProg.exe"; DestDir: "{app}"
Source: "MyProg.chm"; DestDir: "{app}"
Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme

[Icons]
Name: "{group}\My Program 2"; Filename: "{app}\MyProg.exe"

Steps:
  1. Compile both scripts ("red.ico" and "green.ico" must be different).
  2. Install both "My Program 1" and "My Program 2".
  3. Uninstall "My Program 1" and notice the icon on the taskbar.
  4. Uninstall "My Program 2" and notice the icon on the taskbar.
The icon of My Program 2's uninstaller uses the icon of My Program 1's uninstaller.

Antik Mozib

unread,
Jul 16, 2025, 9:34:00 PMJul 16
to innosetup
The script used is the "Example1.iss" script with added program numbers and SetupIconFile.

Christian Blackburn

unread,
Jul 17, 2025, 12:45:38 AMJul 17
to innosetup
Hi Antik,

This might be a Windows Explorer bug.  Does the issue remain after you restart Windows and or flush the shell icon cache? https://windowsloop.com/clear-icon-cache-windows/

Also, it's customary to use an AppID.  

[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{SOME_LONG_GUID}

Cheers,
Christian Blackburn
Message has been deleted
Message has been deleted

Antik Mozib

unread,
Aug 1, 2025, 8:12:10 PMAug 1
to innosetup

Hi Antik,

The icons in the taskbar are cached by Explorer.exe and don't have anything to do with Inno Setup.  Last I knew, Inno Setup didn't offer taskbar pinning.  Windows has millions of bugs.  Their database had 500,000 tickets in it in 2000 when I worked on Windows.  Granted a lot of what was in there were false positives, driver, and hardware issues that were really the manufacturer's fault.  You've stated the difference starts with 6.4.0. Does that mean you've rolled back Inno Setup and the issue no longer happens or does that mean way back when 6.4.0 came out you started observing this? 

Thanks,
Christian


Hi Christian,

Not sure what taskbar pinning has got anything to do with this issue. Also, blaming this on some mysterious Windows bug doesn't help because the issue is reproducible. If you follow the steps I mentioned above and compile the scripts with v6.3.3 and v6.4.0+, you can see for yourself.

Regards,
Antik

On Thursday, 17 July 2025 at 4:16:04 pm UTC+10 Antik Mozib wrote:
Hi Christian,

Thank you for the reply.

Those scripts are just simple modifications to the Example1.iss script already included with Inno. Putting in unique AppIds doesn't make any difference for this bug. The bug is not present in v6.3.3 but is present in all versions from v6.4.0 onwards.

Antik

Eivind Bakkestuen

unread,
Aug 2, 2025, 5:10:56 PMAug 2
to inno...@googlegroups.com
Find yourself a resource editor that can open .exe files and look at the resources inside your two installers.

If the respective .exe files contain the correctly and differently coloured .ico files, then what you are seeing is a Windows bug/artifact/whatever.



--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/innosetup/bbe82196-515b-43ff-884a-b708ab39b9d2n%40googlegroups.com.
Message has been deleted

Antik Mozib

unread,
Aug 3, 2025, 5:47:33 AMAug 3
to innosetup
A Windows "bug/artifact/whatever" that only manifests when compiling the scripts with v6.4.0+? Seems to fail the Occam's razor test...

An Giomach

unread,
Aug 3, 2025, 9:00:10 AMAug 3
to innosetup
Suggest https://www.angusj.com/resourcehacker/ to see the icon in the exe

Gavin Lambert

unread,
Aug 4, 2025, 12:23:03 AMAug 4
to innosetup
On Sunday, August 3, 2025 at 9:47:33 PM UTC+12 Antik Mozib wrote:
A Windows "bug/artifact/whatever" that only manifests when compiling the scripts with v6.4.0+? Seems to fail the Occam's razor test...

The icon used on the taskbar button is by default selected by Windows using arcane rules known only to it.  One of these rules that we do know, however, is that the Windows icon cache will store the icon for a particular .exe filename, and happily reuse this icon later for another file with the same name, even if it lives in a different folder and has a different icon internally.

This is what is happening here.  The uninstaller for both apps is called "unins000.exe", so despite having different icons (which you can see in Explorer itself, no need for resource hackers), they share the same slot in the icon cache.

There are things that apps can do to encourage Windows to give them different cache slots.  The uninstaller does not currently do those things.  As to why it worked in previous versions, there was a significant restructure of various UI things in 6.4.0 and that might have inadvertently changed the result of one of those arcane rules that Microsoft hasn't told anyone about.

I'm not sure if this is related, but one such change in 6.4.0 was the value of Application.MainFormOnTaskBar, which is noted to have many obscure quirks.

Antik Mozib

unread,
Aug 4, 2025, 1:17:22 AMAug 4
to innosetup
Hi Gavin,

Many thanks for the detailed explanation. Much appreciated.

Yes, I noticed those changes in the git tree and had a suspicion that this issue is related.
Reply all
Reply to author
Forward
0 new messages