- NSIS Discussion
- Icons aren't updated
Archive: Icons aren't updated
RobertB
27th November 2003 15:45 UTC
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. ;-)
Anders
27th November 2003 16:47 UTC
delete "shelliconcache" in winnt dir (maybe system32, can't remember) and restart (or use tweakUI from M$, go to the repair tab,repair icons)
Anders
27th November 2003 18:06 UTC
...and for use in your script: http://nsis.sourceforge.net/archive/...ances=0,64,142
Joost Verburg
27th November 2003 20:47 UTC
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.
Anders
27th November 2003 20:53 UTC
Originally posted by Joost Verburg
This file does not always have this name.
really? what other name(s) could it have??
Joost Verburg
27th November 2003 21:00 UTC
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.
RobertB
28th November 2003 09:21 UTC
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
Joost Verburg
28th November 2003 19:30 UTC
Using that function is enough, there is no need to remove the icon cache.
Anders
28th November 2003 21:43 UTC
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
Brummelchen
8th March 2007 08:09 UTC
3 years later - thx :)
onad
8th March 2007 13:07 UTC
>"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.