inno-setup

Inno Setup installer icon not changing


I am building the installer of my application with Inno Setup. But I have the problem that the installer.exe don't have any icon (uses the default) even though I specify one with SetupIconFile. Here is the script:

[Setup]
AppId={{2733F2A1-246B-4D80-8EE4-B37B2BADFD87}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={autopf}\TFGPlay
DefaultGroupName={#MyAppName}
; Name of the installer
OutputBaseFilename=TFGPlay-installer
; Icon for the .exe and the whole process. Descomentar si conseguimos un logo
SetupIconFile="C:\Users\test\Downloads\descarga.ico"
; https://stackoverflow.com/questions/20792468/inno-setup-installer-icon-does-not-show-in-control-panel-or-settings.
UninstallDisplayIcon="C:\Users\test\Downloads\descarga.ico"

I have also found that if I check the properties of the installer, the icon is shown: Screenshot of the icon of the installer


Solution

  • There's nothing wrong with your Inno Setup script. But you are building the project to the desktop. And the desktop icons are cached.

    And in general, using desktop as a build target (for any kind of project) seems like a bad practice to me.

    Build your project to your documents or other folder. Not to the desktop.