View Full Version : Icon on shoft cut not changing?
NewsArchive
11-06-2012, 01:25 AM
Hi Friedrich,
One my clients recently updated their main icon for their application.
He is reporting to me that when he upgrades and existing installation on XP
the desktop shortcut icon is changing to the new one.
However, when upgrading a Win 7 machine the shortcut on the desktop still
has the old icon but the shortcut in the Program Folders has the new icon.
They've reproduced on more than one set of systems.
The short cut is set to replace existing, is set to always install and the
installer is running elevated.
Any ideas?
Thanks,
Rick
NewsArchive
11-06-2012, 01:26 AM
> One my clients recently updated their main icon for their application.
> He is reporting to me that when he upgrades and existing installation on XP
> the desktop shortcut icon is changing to the new one.
> However, when upgrading a Win 7 machine the shortcut on the desktop still
> has the old icon but the shortcut in the Program Folders has the new icon.
> They've reproduced on more than one set of systems.
>
> The short cut is set to replace existing, is set to always install and the
> installer is running elevated.
>
> Any ideas?
Did you try issuing the Refresh Desktop script command at the end of your
installer? That usually helps with things like that.
Also does the correct one appear after a reboot?
If not then you may be seeing Windows caching the old icon.
Charles
--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.clarionproseries.com - ProScan, ProImage, ProPath and other Clarion
developer tools!
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms - Now with PNG support!
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------
NewsArchive
11-06-2012, 01:26 AM
Hi Rick,
What Charles said. The machines seem to have a typical icon cache problem.
What you can try is the "Refresh Desktop" script function. This might or
might not help (depends on different factors). Other than that you can't do
anything else (except a machine reboot).
Friedrich
NewsArchive
11-07-2012, 02:54 AM
I believe they said they tried a reboot.
But I'll try adding the refresh desktop action.
Thanks
Rick Martin
NewsArchive
11-07-2012, 02:54 AM
Hi Rick,
> I believe they said they tried a reboot.
> But I'll try adding the refresh desktop action.
If it still displays the "wrong" icon even after a reboot then the Shortcut
points to an incorrect icon file or icon index from the .exe resource.
For example, you have an existing Shortcut and you display icon #3 from an
..exe. Now you update the .exe and you would like to display icon #5. But
you did not replace the (existing) Shortcut so your shortcut still points to
icon #3 in the next .exe.
If a reboot does not help then it definitely points to the wrong icon
file/index (and it is NOT a cache problem). If you do not point to a
specific icon index then the icon in the .exe resource is incorrect (not the
first icon in the .exe resource).
Friedrich
NewsArchive
11-07-2012, 02:55 AM
but then why would it work in XP and not in Win 7?
Rick
NewsArchive
11-07-2012, 02:55 AM
Rick,
>
> but then why would it work in XP and not in Win 7?
>
There must be a reason for it. If the Shortcut still displays the wrong
icon even after a reboot then that specific Shortcut points to the wrong
icon file or index (because a reboot always clears the cache).
Friedrich
NewsArchive
11-08-2012, 01:28 AM
Rick,
We have tested the Shortcut replacement scenario on three different Windows
7 (x64) machines. No "Refresh Desktop" function used, just a standard
setup.
The first setup installs a single test executable and a Desktop icon that
points to icon #27 (located in the .exe). The update replaces the
executable and the Shortcut (and points to icon #47 now). All Windows
machines displayed the new Desktop icon immediately.
Friedrich
NewsArchive
11-09-2012, 01:42 AM
If I get one stuck and nothing else works I do this (I'm sure the location is
different on XP)
Delete or rename:
C:\Users\<username>\AppData\Local\IconCache.db
Reboot.
Forces Windows Explorer to completely rebuild it's Icon Cache as I'm sure you
can see.
Regards,
Kelly E Major
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.