I have created an installer with Inno Setup. The icon used for the desktop shortcut and start menu is embeded in the application executable.
When the installer was initially created, I didn't have the final product icon from the design team. I used a temporary icon instead as I completed the installer.
Everything worked as it should until I changed the icon for the final one. Now the desktop shortcut and start menu icons always display the old icon even though everywhere else the icon is correct.
This is the Icon declaration section of the script.
[Icons] Name: {group}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; WorkingDir: {app} Name: {group}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe}; IconFilename: {app}\Icons\stop.ico Name: {commondesktop}\{#MyAppVersionName}; Filename: {app}\{#MyAppExeName}; Tasks: desktopicon; WorkingDir: {app}
Here's what I've tried: (This is a Windows 7 system)
If I look at the shortcut properties, and choose "change icon" I see the correct icon. Re-selecting it has no effect. I've also tried selecting a dis-related icon and then re-selecting the correct on... still shows the old one.
I've followed suggestions to delete the IconCache.db and restarting the machine but this has no effect either.
Where in the world is the old icon coming from? It's nowhere in the installer.
Ideas anyone?
As you know the application icon is built into the .exe file. The Inno Setup cannot modify the .exe files. And there's no other way to override the application icon by an external one. You have to edit the .exe file yourself, before building the installer.
Step 1: Right-click the icon, then click “Properties.” Step 2: Click the “Change Icon” button at the bottom of the window. Step 3: Click the icon that you want to use, then click “OK.” Step 4: Click “Apply,” then click “OK.”
In [Files] section, you install your giotto. ico to the application folder (you may want to install the icon only when the desktopicon task is selected). In [Icons] section, you create the desktop icon using the installed giotto.
It seems that this indeed was related to the IconCache.db
file. I can only guess that something wasn't done in the right order (though I tried differing procedures more than once).
Here's how I performed the reset manually:
cd /d %userprofile%\AppData\Local
(and press Enter)attrib –h IconCache.db
(and press Enter)del IconCache.db
(and press Enter)start explorer
(and press Enter)Now everything renders just as it should.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With