win10图标重建缓存

The icons that Windows uses for your documents and programs are saved in an icon cache, so they can be displayed quickly instead of having to slowly load them every time. If you ever have problems with the icons on your computer, rebuilding the icon cache might help.

Windows用于文档和程序的图标保存在图标缓存中,因此可以快速显示它们,而不必每次都缓慢加载它们。 如果您的计算机上的图标有问题,则重建图标缓存可能会有所帮助。

Sometimes the icon cache gets out of date, causing icons to display incorrectly, or even go missing. For example, maybe you upgraded an application and the new version came with a new icon, but you still see the old icon on the desktop. Sometimes a blank or damaged icon may appear when a perfectly good icon was displayed before. When this happens, you have to reset the icon cache and let them automatically re-create it. In this article, we’ll show you how to rebuild the icon cache in Windows 10. This guide also applies to Windows 8 and 7, but the process works slightly different.

有时,图标缓存过时,导致图标显示不正确,甚至丢失。 例如,也许您升级了一个应用程序,而新版本附带了一个新图标,但是您仍然在桌面上看到旧图标。 以前显示完美的图标时,有时可能会出现空白或损坏的图标。 发生这种情况时,您必须重置图标缓存并让他们自动重新创建它。 在本文中,我们将向您展示如何在Windows 10中重建图标缓存。该指南也适用于Windows 8和Windows 7,但是其工作原理略有不同。

Windows中图标缓存的工作方式 (How the Icon Cache Works in Windows)

Icons are everywhere in Windows: the Control Panel, Programs and Features, File Explorer, and so on. Having to retrieve all possible icon images from hard disk and to render them dynamically can consume lots of system resources. As a result, Windows save icons it’s already retrieved in its memory. When you shut down or restart, it will write this cache to a hidden file on your hard drive, so it doesn’t have to reload all those icons later.

Windows中到处都有图标:“控制面板”,“程序和功能”,“文件资源管理器”等。 必须从硬盘上检索所有可能的图标图像并进行动态渲染会消耗大量系统资源。 结果,Windows将图标保存在内存中。 当您关闭或重新启动时,它将把此缓存写入硬盘驱动器上的隐藏文件,因此以后不必重新加载所有这些图标。

The database file grows as more information is added to it. According to this document from MSDN knowledgebase , when Windows needs to display an icon, it’ll check the cache, and display the cached icon if a match is found. If it doesn’t find one, it’ll check the executable file and scan the application directory.

随着向其添加更多信息,数据库文件将增长。 根据MSDN知识库中的此文档,当Windows需要显示图标时,它将检查缓存,如果找到匹配项,则显示缓存的图标。 如果找不到,它将检查可执行文件并扫描应用程序目录。

Caching mechanisms, such as the IconCache database, have been already discussed by multiple system specialists, and in depth by Mark E. Russinovich and David A. Solomon in their Windows Internals book, if you’re curious to learn more, but the basics are all you need to understand for this process.

缓存机制(例如IconCache数据库)已经由多位系统专家进行了讨论,Mark E. Russinovich和David A. Solomon在Windows Internals书中已经进行了深入探讨,如果您想了解更多信息,但是基础知识是您需要了解的所有内容。

图标缓存的存储位置 (Where the Icon Cache Is Stored)

In Windows Vista and Windows 7, the icon cache file is located in:

在Windows Vista和Windows 7中,图标缓存文件位于:

C:\Users\<your username>\AppData\Local\IconCache.db

(Replace <your username> with the actual login name for your Windows account.)

(用您的Windows帐户的实际登录名替换<your username> 。)

This file is still present in Windows 8 and 10, but Windows does not use them to store the icon cache. In Windows 8 and Windows 10, the icon cache file is located in:

Windows 8和10中仍然存在该文件,但Windows不会使用它们来存储图标缓存。 在Windows 8和Windows 10中,图标缓存文件位于:

 C:\Users\<your username>\AppData\Local\Microsoft\Windows\Explorer

(Replace <your username> with the actual login name for your Windows account.) In this folder, you will find a number of icon cache files: •    iconcache_16.db •    iconcache_32.db •    iconcache_48.db •    iconcache_96.db •    iconcache_256.db •    iconcache_768.db •    iconcache_1280.db •    iconcache_1920.db •    iconcache_2560.db •    iconcache_custom_stream.db •    iconcache_exif.db •    iconcache_idx.db •    iconcache_sr.db •    iconcache_wide.db •    iconcache_wide_alternate.db

(用您的Windows帐户的实际登录名替换<your username> 。)在此文件夹中,您将找到许多图标缓存文件:•iconcache_16.db•iconcache_32.db•iconcache_48.db•iconcache_96.db•iconcache_256。 db•iconcache_768.db•iconcache_1280.db•iconcache_1920.db•iconcache_2560.db•iconcache_custom_stream.db•iconcache_exif.db•iconcache_idx.db•iconcache_sr.db•iconcache_wide.db•iconcache_wide_alternate.db

To rebuild the icon cache, you have to delete all the iconcache files that appear in this folder. It’s not as simple as clicking on them and pressing Delete, though: those files are still in use by Explorer, so you can’t just delete them normally.

要重建图标缓存,您必须删除出现在此文件夹中的所有iconcache文件。 不过,这并不像单击它们并按Delete键那样简单:Explorer仍在使用这些文件,因此您不能仅将它们正常删除。

如何重建图标缓存 (How to Rebuild the Icon Cache)

Close and save anything that you are working on before proceeding. Open File Explorer and go to the following folder:

在继续操作之前,请关闭并保存您正在处理的所有内容。 打开文件资源管理器,然后转到以下文件夹:

C:\Users\<your username>\AppData\Local\Microsoft\Windows\Explorer

(Replace <your username> with the actual login name for your Windows account.)

(用您的Windows帐户的实际登录名替换<your username> 。)

Press and hold the “Shift” key and right-click on the Explorer folder. Select “Open command window here.”

按住“ Shift”键,然后在Explorer文件夹上单击鼠标右键。 选择“在此处打开命令窗口”。

A command prompt window will open at that path:

在该路径下将打开一个命令提示符窗口:

To make sure the command prompt is in the correct folder, type the dir command. You should see the iconcache and thumbcache files we discussed earlier appear.

要确保命令提示符在正确的文件夹中,请键入dir命令。 您应该看到我们前面讨论过的iconcache和thumbcache文件出现了。

Right-click on the Windows taskbar and choose “Task Manager” from the shortcut menu.

右键单击Windows任务栏,然后从快捷菜单中选择“任务管理器”。

Right-click on “Windows Explorer” in the list and choose “End task” from the shortcut menu. The Explorer and desktop will disappear. Exit Task Manager and make sure that no other application is running except for the command prompt window.

右键单击列表中的“ Windows资源管理器”,然后从快捷菜单中选择“结束任务”。 资源管理器和桌面将消失。 退出任务管理器,并确保除了命令提示符窗口外,没有其他应用程序在运行。

In the command prompt window type the following command:

在命令提示符窗口中,键入以下命令:

del iconcache*

Press Enter. The asterisk after iconcache is necessary to make sure all files with names that start with iconcache will be included in the delete operation. That should delete all the icon cache files.

按Enter键。 iconcache之后的星号是必需的,以确保所有以iconcache开头的文件都将包含在删除操作中。 那应该删除所有图标缓存文件。

Run the dir command to check the list of remaining files. If one or more iconcache files are still listed, it means some applications are still running in the background. Close them and repeat the procedure again, if necessary.

Run the dir命令以检查剩余文件的列表。 如果仍然列出一个或多个iconcache文件,则意味着某些应用程序仍在后台运行。 关闭它们,并在必要时再次重复该过程。

Now press the Ctrl+Alt+Del keys simultaneously, and choose “Sign off.” Sign back in, and any out-of-date or missing icons should hopefully get repaired or re-created.

现在,同时按Ctrl + Alt + Del键,然后选择“注销”。 重新登录,希望可以修复或重新创建任何过时或丢失的图标。

Remember, rebuilding the icon cache will not help with thumbnails issues (you’ll need to go through this process to do that), the wrong icon for a specific file extension, or a missing shortcut icon. But if you have other icon problems, hopefully rebuilding the icon cache will fix them.

请记住,重建图标缓存将无助于解决缩略图问题(您需要完成此过程 ),特定文件扩展名的图标错误或缺少快捷方式图标。 但是,如果您还有其他图标问题,则希望重建图标缓存可以解决这些问题。

翻译自: https://www.howtogeek/232779/how-to-rebuild-a-broken-icon-cache-in-windows-10/

win10图标重建缓存

更多推荐

win10图标重建缓存_如何在Windows 10中重建损坏的图标缓存