Archive: Icons aren't updated


Icons aren't updated
Hi All !

During the install of my programm i create a desktop-shortcut using the following line in my Nsis-script:

SetOutPath "$INSTDIR\Icons"
File ".\Icons\Programm.ico"

CreateShortCut "$DESKTOP\Proggy.lnk" "$INSTDIR\MyProg.exe" "" "$INSTDIR\Icons\Programm.ico"

When i first installed the programm, the shortcut had shown the correct icon. Then i deinstalled the programm, an recompiled the installer with a different set of icons.
After that i installed the Programm again using the new installer.

And here is my Problem:
Instead of creating the shortcut with the new icons, the shortcuts were created with the old icons.
Now i have made sure, that the old Icons were no longer copied into the new installer. And i have also checked several Times, that the right installer was executed. But my Problem stays the same.

Do i have to keep anything in mind creating a shortcut ?
Does Windows 2000 Professional eventually remember the Icons?

I'using Nsis version 2.0b4

Any hints will help...

Thanks a lot

Robert

P.S. Sorry if the English is bad, i'm still learning. ;-)


delete "shelliconcache" in winnt dir (maybe system32, can't remember) and restart (or use tweakUI from M$, go to the repair tab,repair icons)


...and for use in your script: http://nsis.sourceforge.net/archive/...ances=0,64,142


Originally posted by Anders
delete "shelliconcache" in winnt dir (maybe system32, can't remember) and restart (or use tweakUI from M$, go to the repair tab,repair icons)
This file does not always have this name.

Originally posted by Joost Verburg
This file does not always have this name.
really? what other name(s) could it have??

Windows XP has an icon cache file somewhere else. To rebuild the icon cache, you don't have to remove that file and restart. There are better methods.

This archive page code is enough for the question in this topic.


Hi Anders and Joost!

Thank you! Now it works.
I first deleted the shelliconcache, restarted and all Icons were correct then.
But now I also included the "RefreshShellIcons" function into my script, and call it in "Function .onInstSuccess" just in case...

Thanks again,

RobertB


Using that function is enough, there is no need to remove the icon cache.


Originally posted by Joost Verburg
Using that function is enough, there is no need to remove the icon cache.
i know u should do this in your script, but deleteing the iconcache is ok on ur own system when the icons are fucked up

3 years later - thx :)


>"Using that function is enough, there is no need to remove the icon cache."

In normal cases, yes. But in some cases if one installs an icon with the exact SAME name multiple times, the iconcache gets messed up.

E.g. one constantli redesigns/impoves the icon design with every installer build and reinstalles on the same machine to retest where the icon always has the same name.