某些XE2程序在Windows资源管理器中不显示新的可执行文件 [英] Some XE2 Programs Don't Show new executable Icons In Windows Explorer

查看:270
本文介绍了某些XE2程序在Windows资源管理器中不显示新的可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个Delphi XE2编写的程序是从Delphi 2005转换出来的,Windows 7将在桌面上显示捷径图标。



使用IcoFX,我创建了一个新的图标,包含通常的4种尺寸(256,48,32和16),并浏览我的程序,进入外观选项卡并加载新图标。



重建它们后,我将Windows资源管理器切换到大图标视图,并查看Bin文件夹中的程序,但是我发现只有一些显示新的256px图标。其他人仍然显示较小的48px一个。



我已经检查了项目选项,他们都似乎是一样的,所以我使用资源黑客看EXE的。它们都包含4个不同大小的图标,名称为1,2,3,4,它们都包含一个包含所有4种尺寸的MAINICON资源的图标组。



所以我很失望,为什么一些显示大图标正确,而其他人不。任何人都有这个想法?

解决方案

这听起来像是在Windows中缓存你的图标。所有可执行文件首次显示时都会将其图标缓存到Windows中,因此如果您更改了图标,Windows将会缓存旧的图标。



你应该清除你的图标缓存。为此,您需要删除位于此位置的隐藏系统文件夹中的文件:

  C:\\ \\Users\User-Name\AppData\Local\IconCache.db 

替换用户-Name与您的用户配置文件文件夹的文件夹名称。一旦你删除了这个,你必须注销并重新启动,或者杀死/重新启动 explorer.exe 进程。执行此操作后,所有内容都应正确显示。


I have several programs written in Delphi XE2 that were converted from Delphi 2005, which under Windows 7 would display horribly scaled icons when shortcuts were made on the Desktop.

Using IcoFX, I created a new icon containing the usual 4 sizes (256, 48, 32, 16) and went through my programs, going to the Appearance tab for each and loading the new icon.

After rebuilding them all, I switch Windows Explorer to Large Icons view and take a look at the programs in the Bin folder, but I found that only some of them show the new 256px icon. The others still show the smaller 48px one.

I've checked the Project options again, and they all seem to be the same, so I used Resource Hacker to look at the EXE's. All of them contain 4 icons, named 1, 2, 3, 4, of differing sizes, and they all contain an Icon Group with a MAINICON resource that includes all 4 sizes.

So I'm at a loss as to why some show Large Icons correctly while others don't. Anyone have any thoughts on this?

解决方案

It sounds like you're experiencing Windows caching your icons. All executable files get their icons cached by Windows the first time they're shown, and thus if you change your icon, Windows will still display the old one because it's cached.

You should clear your icon cache. To do this, you need to delete a file which is in a hidden system folder, found at this location:

C:\Users\User-Name\AppData\Local\IconCache.db

Replace "User-Name" with the folder name of your user profile folder. Once you have deleted this, you must log off and back on, or kill / restart the explorer.exe process. After you do this, everything should show correctly.

这篇关于某些XE2程序在Windows资源管理器中不显示新的可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆