Why can't I change the icon being displayed for a desktop shortcut?

2

I wanted to change the icon showing for a shortcut on the desktop, which points to a .Net utility I created for myself. I rebuilt the exe after changing the icon used within the project.

In Windows Explorer the new icon shows in all size variations for the exe. In the 'Change Icon' dialog from the Properties option, the correct icon is showing as present, yet when I Apply it remains with the old icon?

Even when I delete the shortcut and create a new one pointing to the newly built exe the old icon somehow is assigned?

Bill

Posted 2010-02-11T21:16:34.167

Reputation: 383

Answers

2

Windows explorer keeps a cache of icons. You can try deleting the following file:

Vista/7: C:\Users\<username>\AppData\Local\IconCache.db
XP: C:\Documents and Settings\<username>\Local Settings\Application Data\IconCache.db

Also, killing explorer.exe and restarting it may help.

heavyd

Posted 2010-02-11T21:16:34.167

Reputation: 54 755

Keep in mind, that is not the windows 7 path..... that's an XP path. – Brett – 2010-02-11T21:52:51.387

I can't find an equivalent folder in Windows7, and restarting the machine didn't solve it. – Bill – 2010-02-11T22:05:36.083

Edited to add Win7 path. If the restart didn't help, probably not a caching issue then. – heavyd – 2010-02-11T22:15:37.167

Probably not a caching issue either because there is no IconCache folder in my AppData\Local folder. The problem is also not Win7-64 related because I get exactly the same behaviour on a Win7-32 laptop as well. – Bill – 2010-02-12T05:50:16.587

1

I had the same problem till I realised I had accidentally selected the .exe file instead of the .ico file for the icon - since the correct icon shows against the .exe file it is quite easy to make this mistake and you cna press the apply button without triggering a warning or error - the shortcut then of course will not display the correct icon and defaults to the Windows default.

user318266

Posted 2010-02-11T21:16:34.167

Reputation: 11