Windows 7 .ico file being replaced with cached version - caching

I'm having a problem exactly like the one in this very short video.
http://www.youtube.com/watch?v=912c6sQAsH0
I do not feel comfortable running a downloaded .exe file from a third party unknown developer as suggested by the link from the youtube page.
Does anyone know how to manually solve this problem?
Thanks.

Another way to rebuild the icon cache in Windows 7 without a restart is to change momentarily the screen color depth to 16 bits, for example, and when Windows asks you whether you want to keep the changes or not, click "No" to restore the original settings. This will invalidate the icon cache and Windows will recreate it instantly.

The problem is something called icon cache. Windows saves all recent icons in one file so that it does not have to gather icons all over the disk. This speeds up the system start.
Googling with the term "windows 7 rebuild icon cache" (without quotes) I was able to determine that icon cache is stored in file %USERPROFILE%\AppData\Local\IconCache.db and that all you need to do is rename it and restart Windows, like it's described here. Explorer has a hold of that file so you can't just delete it. There is a .bat file that makes it easy to delete the cache. You can download the file from here.

Related

How do I undo a change of the PDF icon provided by Microsoft Edge?

I've messed up my Windows 10 file associations regarding PDF file icons, and I can't undo it because I can't find the original icons.
Please give me a copy of the default Microsoft Edge PDF icon, or tell me their location. I would especially like to know about the old icons.
I found the old PDF icons here:
C:\Windows.old\WINDOWS\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\Assets\
Note that this is under C:\Windows.old\, which holds the Windows directory from before the last Windows version upgrade, and which is automatically deleted by Disk Cleanup after 30 days. Make sure to copy the icons to a folder you control.

How to rebuild Windows Icon Cache without closing explorer.exe or restarting Windows? [duplicate]

This question already has an answer here:
Refresh IconCache.db programmatically
(1 answer)
Closed 6 months ago.
Task
I am trying to customise a folder icon from within my Application but due to the way Windows caches icons and thumbnails I am struggling to get the changed folder to update it's new icon.
In Windows there are two ways that I know of to customise a folders icon, the simplest way is to right click the folder from Windows Explorer, Properties and then select the Customize tab and change its icon, this method is no good though as it requires manually changing the folder properties.
The second way which I am doing from my program is to create a desktop.ini file and place it inside the folder that requires the icon changing, documentation on desktop.ini can be found here: http://hwiegman.home.xs4all.nl/desktopini.html and an article here: http://helpdeskgeek.com/how-to/customize-folder-icons-desktop-ini/
As shown below though, the folder icon in Windows is not updated although you can see from the folder properties that the icon has changed, just Windows is not showing the updated folder icon:
I am fully aware of Windows caching icons and thumbnails, I have searched and read several pages on ways to supposedly rebuild the icon cache and thus get Windows to display the newly changed icon and not the cached one, however I am unable to get this to work from my Application without restarting Windows or the Explorer.exe process, this needs to be done without interrupting Windows though so closing Explorer.exe or requiring a restart is absolutely not an option.
Interestingly though, when changing a folder icon from the first way I described earlier, Windows somehow manages to flush and rebuild the icon cache as the changed folder is promptly updated to show the new icon, however I cannot see what tricks Windows does to achieve this.
Attempts
A few things I tried unsucessfully, (in no particular order):
Executing the following: ie4uinit.exe -ClearIconCache
Running this code in Lazarus: SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, nil, nil);
Deleting the IconCache.db file from AppData\Local
Toggling the "Always show icons, never thumbnails" Explorer option from the registry, located here: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced which is stored in the IconsOnly value
Changing the icon size from the registry and back, located here: HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics which is stored in the Shell Icon Size value
This link provides an apparent solution in Delphi which I was unable to convert in Lazarus: http://www.aha-soft.com/faq/q18.htm
I am aware of cached db files here: AppData\Local\Microsoft\Windows\Explorer although I am not sure if they are of any help, attempting to delete some of them does not seem possible as they may be locked etc.
Renaming the folder and then rename back to original name.
Right click an empty space in Windows Explorer and selecting Refresh does not seem to update the folder icon either.
Have also tried performing some of the above in combination with no luck.
Question
When changing a folder icon directly from Windows Explorer, using the properties context menu and customize tab, when applying and closing this dialog the folder icon is changed almost immediately, there is no closing explorer.exe or restarting Windows, the change happens very much right away.
How can I achieve this from my Application programmatically the same way Windows Explorer does? Is there a way to find out how Windows Explorer does this?
My Operating System is Windows 10 which could explain why some of the older methods don't work for me.
I don't think this is anything to do with icon caching; you just need to inform Explorer that the folder's icon has changed. You can do this using the SHChangeNotify function.
LPCWSTR pszFolder = L"c:\\path\\to\\folder";
SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATH, pszFolder, NULL);

Force Firefox not to change file extension?

Is it possible to force Firefox not to change the file extension of a file the user downloads? Currently I have the problem that I have a .reg file to download, but Firefox, even though in the Download dialog it says "Text file (*.reg)", saves it as a .reg.txt file, which is highly annoying. How to fix this?
You could try to do the following things:
1.) https://support.mozilla.org/en-US/kb/change-firefox-behavior-when-open-file
Maybe extension (in your case .reg) is associated with Notepad and you could changed it in Options/Applications
a) Click the menu button and choose Options.
b) Select the Applications panel.
c) The Applications panel will display. Select the type of file for which you want to change the default action.
2.) https://bugzilla.mozilla.org/show_bug.cgi?id=511624
This is an old bug, but if you use the affected version of firefox...
When you right click on a link to a batch file and click save as, it will allow you to save it, but it automatically adds .txt to the end of the filename without informing you.
You are unable to save it as .bat
Reproducible: Always
Steps to Reproduce:
1.Right click on a batch file link
2.Click save as
3.Save it
Actual Results:
filename is file.bat.txt
Seems to be a Firefox on Windows bug. My coworker was implementing download of .reg files and I use Firefox, I tested for him and got a .reg.txt. Just renaming it after download was sufficient to make the .reg work, but I got curious if that would happen on Linux also.
Grabbed my laptop where I have Ubuntu installed and the file was downloaded with the correct extension (just didn't run because .reg is a windows extension, it did open in the text editor). It was not automatically renamed as a .txt.

Tortoise SVN Icon Overlays Displaying Everywhere...Why?

Update: So, this turns out to have nothing to do with Tortoise SVN. I use Mozy.com for off-site backups and their new version includes these icon overlays. They can be disabled via the config options...or see here http://forum.pcmech.com/showthread.php?p=1385433. Thanks #OS for the answer.
Been using Tortoise SVN for some time on my Vista box. Within the last few days (and after recently upgrading to 1.5.4) the icon overlays are displaying on all files.
My exclude path is:
*
My include paths are:
C:\Users\jw\Documents\Visual Studio 2008\Projects\SVNProjects*
C:\Users\jw\Documents\VB Projects\SVNProjects*
I haven't touched those settings in months. Any ideas? Help. Thanks.
Something like that happened to me a few days ago and it turns out it's not related to Tortoise... I'm using Mozy to backup files automatically and their latest update includes icons very similar to Tortoise to mark backed-up files.
Icons usually appear for folders for files in a folder that have a hidden .svn subfolder. It sounds like your icon cache is corrupt though. You might also want to check the Icon Overlays section in the Settings dialog. If it's using the default icon cache, try killing the TSVNCache.exe process. If it's using the chell cache, kill explore.exe, in a cmd window go to %USERPROFILE%\AppData\Local, type "attrib –h IconCache.db" and then "del IconCache.db" and re-start explorer.exe.
The icons can disappear because there is a limit to the number of overlays Windows will support.
See http://tortoisesvn.net/faq.html#ovlnotshowing
agree with marxidad,
you can also try to rebuild the tortoisesvn icon cache using
TortoiseProc.exe
/command:rebuildiconcache
from the command line.

How to change Firefox icon?

Is there any way to change Firefox system icon (the one on the left top of the window)?
Precision : I want to change the icon of a bundled version of Firefox with apache/php and my application. So manual operation on each computer is not a solution.
I try Resource Hacker and it's the good solution. The add ons one is good too.
Resource hacker does the job of swapping application icons in Windows (up to XP, not tested with Vista yet).
Available at:
http://www.angusj.com/resourcehacker/
#phloopy's good suggestion to use http://iconpacks.mozdev.org/ unfortunately doesn't work with newer versions of Firefox (I think to the omni.jar change). You can still use their ICO files (or your own), but you now need to do the following manual steps...
Unzip omni.ja in your Firefox application directory.
Delete omni.ja or rename it (e.g. omni.ja.off).
Create directories icons/default in the Firefox chrome application directory.
Copy the icon file you want to chrome/icons/default/main-window.ico
Start Firefox and enjoy your new icon
Notes:
There are other ICO file names you can use for other windows. The ones I have personally seen work are:
main-window.ico for browser windows and Scratchpad
downloadManager.ico for Downloads
If you know others please comment so I can add them. I personally would love one for Firebug and the Error Console. One for Library (Bookmarks) would be nice also (bookmark-window.ico does not work).
Your start time will be a little slower (due to the unzipping of omni.ja). In theory you can jar it up again, but I am not 100% sure that will work once they get the omni.ja optimization working again (it's "broken" in Firefox 10 so omni.ja is actually normal JAR/ZIP file).
If you let Firefox update you will need to do this again
Note many zip tools cannot read Firefox’s variation on the JAR format (see https://bugzilla.mozilla.org/show_bug.cgi?id=605524).
More info is available at http://iconpacks.mozdev.org/docs/faq.html
There are icon packs available at http://iconpacks.mozdev.org/ that work by installing an extension. If you want to use your own icon, extensions are just zipped files so change the extension from xpi to zip and examine the source code and images it contains to customize it. If you do customize it, I suggest changing the GUID that so it doesn't auto-update and overwrite your customizations.
I think you mean the system icon, not the site icon as someone else thought. On a Mac, you can hold-Click -> Get Info on Firefox.app, then drag or paste an image on top of the icon.
I'm not sure about Windows, but I think you may need to compile from source to change it.
If you're talking about the application icon (which under Windows is typically located in the top-left corner of the application's window), then... no... and yes.
Like most windows apps, the icon you see there is probably a resource compiled into the application itself, so you can't change it.
There may be add-ins to Firefox that let you do this, but I doubt it - that icon is trademarked and "identifies" the Firefox "brand" (if you will). So it's unlikely that you could change it at run-time.
Firefox is open-source; you could always just download & compile your own version, replacing the icon resource with your own. A bit dramatic, but possible.

Resources