28

I have an Inno Setup project. Everything is fine, but I do not see the application icon in the "Programs and Features" control panel area. I do see the icon everywhere else.

The script file does have the following:

[Setup]
SetupIconFile={#MySetupImageIco}

Is there something else that I need to set to get the application icon to show in the Programs and Features control panel applet? I am testing against Windows 8.1.


UPDATE:
Based upon comments, I tried setting in my script:

UninstallDisplayIcon={#MySetupImageIco}

Sadly, that did not yield the icon in the Add/Remove aka Programs and Features Control Panel applet.


UPDATE #2:
The winning solution is:

UninstallDisplayIcon={app}\{#MyAppExeName}

Naturally, there has to be a #define MyAppExeName "whatever.exe" above that at the top of the script. Interesting that when I specified the path to the ico file, I had no success. Inno Setup for Windows 8 and 8.1 wants what I just said. Windows 7 works with UninstallDisplayIcon and specifying the path to the ICO or without that, just Windows 8 and 8.1 are a bit different.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Sarah Weinberger
  • 15,041
  • 25
  • 83
  • 130
  • I should add that the end-user installer shows the icon in multiple places, not just in the control panel area and the other instances of the icon are fine. I am taking a stupid user point of view. Each visual instance of that icon may or may not be linked to that one SetupIconFile variable. Is it possible that the control panel applet uses a different variable? – Sarah Weinberger Dec 26 '13 at 23:37

5 Answers5

51

Solution is:

Add

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

Specifying the actual ico file did not work, but this entry did.

I tested against Windows 8/8.1. Windows 7 works without this line.

Thomas Weller
  • 55,411
  • 20
  • 125
  • 222
Sarah Weinberger
  • 15,041
  • 25
  • 83
  • 130
  • I have an issue where control panel shows generic icon, I want to change it. I did the `SetupIconFile=MyIcon.ico` and the install output now shows the icon but the same icon is not displayed in control panel, will this fix that issue? – zar Aug 17 '15 at 15:50
  • I am not sure of your question. I just checked my app in Control Panel Programs & Features on Windows 10 and I do see the ICO image. I recommend creating a clean install OS on Oracle's Virtual Box and trying again. – Sarah Weinberger Aug 17 '15 at 18:48
  • 5
    The path specified by [`UninstallDisplayIcon`](http://www.jrsoftware.org/ishelp/index.php?topic=setup_uninstalldisplayicon) is saved as-is to uninstall registry key on the target machine. So it has to point to a file that exists on the target machine. It's not embedded to the installer the way the `SetupIconFile` is. So the `UninstallDisplayIcon` can point even to `.ico` file, if needed, but the `.ico` file needs to be explicitly deployed to the target machine (e.g. using `[Files]` section). – Martin Prikryl Feb 03 '16 at 09:42
15

I can confirm this as a working solution too (Win7 x64):

[Setup]
UninstallDisplayIcon={uninstallexe}

What I really love here it's independent to app name etc. Just pure alias to uninstaller.

Found at https://dutchgemini.wordpress.com/2011/05/03/innosetup-and-the-missing-uninstall-icon-on-windows-7

Yury Schkatula
  • 5,291
  • 2
  • 18
  • 42
1

In Windows 11, you can use the icon file itself.

UninstallDisplayIcon=C:\Path\to\ico\file does the thing.

Worked for me.

NameError
  • 206
  • 1
  • 3
  • 19
-1

Add

It should be

UninstallDisplayIcon= {app}ForwardSlash{#MyAppExeName}

I tested it against Windows 10 latest build.

MD SHAHIDUL ISLAM
  • 14,325
  • 6
  • 82
  • 89
Mehul Sant
  • 29
  • 3
  • I just checked my code and you are right about the slash, though not sure "forwardSlash" equates to a "\". I am using a backslash and have been, but did not notice the missing slash. I checked the answer above, before my edit, and see that I added a backslash, but that the slash did not show, so I will make that a forward slash. – Sarah Weinberger Aug 27 '15 at 13:51
  • It's non sense, of course it is a backslash. It's a Windows path. (Though as always, you can use forwards slash, Windows recognizes that too, but it's not correct). – Martin Prikryl Feb 03 '16 at 13:12
-3

I had a problem with your #MyAppExeName solution because I use the OutputBaseFilename directive. A more elegant solution is:

UninstallDisplayIcon={srcexe}
George
  • 1