Application icon corrupted in Vista / Win7 Explorer shortcuts after installing update

Possible duplicate:
Invalid Windows 7 desktop shortcut icon (Inno Setup)

I have an application deployed with Inno Setup installer. When I do an update install (i.e. Run install-1.5.exe when version 1.0 is already installed), if my application binary is in use (either my application is running, or perhaps some other process has locked the image file), I after reboot face the corruption of the icon cache in the explorer. Explorer shows a blank / standard shortcut icon for my application on the desktop and in the start menu.

We did a web search and found many "kitchen sink" methods to update the Explorer icon cache, none of which seems completely reliable across all operating systems. Thus, we would rather find out what is causing this corruption in the first place and cure the disease rather than treat the symptoms.

This happens on Windows Vista and Windows 7, but not on Windows XP.

In particular, the corruption "takes effect" whenever the file association is updated by Explorer. This can be immediate (if ChangeAssociations = yes is set in the Inno script) or later.

Has anyone encountered this before? We don't understand why the icon cache corruption occurs.

+3


source to share


2 answers


While a restart is required explorer.exe

, the following batch of script does not require a restart:

rebuild-icon-cache.bat



@echo off
taskkill /IM explorer.exe /F
cd /d %userprofile%\AppData\Local
del IconCache.db /a
start explorer.exe

      

+1


source


Follow these steps to clear the windows 7 cache icon
1) Write in the command line "cleanmgr"
2) Select the local drive where your windows are located. ("C: \" by default)
3) Wait ...
4) Check the "Thumbnails" checkbox and uncheck all other checkboxes 5) End the "explorer.exe" process from the "Task Manager" (Ctrl + Shift + Esc by default )
6) Click "OK" in cleanmgr and wait.

Please vote up if this post helped you!



0


source







All Articles