更改和编程刷新图标(无需重新启动) [英] Change and refresh icons programmatically (without rebooting)

查看:195
本文介绍了更改和编程刷新图标(无需重新启动)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我手动更换图标(即,不从资源管理器中文件夹选项窗口),图标(S)不被更新。例如,如果我执行这个批处理code:

When I'm replacing icons manually (i.e. NOT from the Folder Options window in explorer), the icon(s) aren't being updated. For example, if I execute this batch code:

REG ADD HKCR\testfile\DefaultIcon /ve /d "C:\test.ico,0" /f

图标(s)显示应该像他们在文件夹选项列表中,但不会更新桌面上或者在资源管理器的图标。

the icon(s) show like they should in the list in Folder Options, but the icons aren't updated on the desktop or in explorer.

的图标,如果我只是打任何文件类型更改图标按钮,更新退出文件夹选项窗口。但是,这无法通过批处理或VBS据我所知完成。

The icons are updated if I just hit the "change icon" button for any file type and exit the Folder Options window. But this can't be done via batch or VBS as far as I know.

重新启动Explorer.exe的的工作,但如果我这样做,在任务栏成为越野车的应用程序选项卡由于某种原因(例如:当应用程序最大化,我不能只左键单击任务栏中的标签到了最小化 - 我有实际右键单击它并击中减少...)。更何况,如果我那样做,所有打开的IE窗口将关闭,这是一个小麻烦。

Restarting explorer.exe DOES work, but if I do that, the application tabs in the task bar become buggy for some reason (e.g.: when an application is maximized, I can't just left click the tab in the task bar to minimize it anymore - I have to actually right click it and hit minimize...). Not to mention, if I do it that way, all open explorer windows will close down, and that's a little bothersome.

我也有副本的 TuneUp Utilities的,这对重装图标缓存的选项,但这工作像预期。但是,我再次无法通过批处理或VBS访问此工具。而且它不会重新启动的Explorer.exe或删除任何文件(像一些解决方案来实现)。我敢肯定这个,因为我没有我的操作系统驱动器上的文件iconcache.db的随时随地

I also have a copy of TuneUp Utilities, which has an option for reloading the icon cache, and this does work like intended. But once again, I can't access this tool via batch or VBS. And it doesn't restart explorer.exe or remove any files (like some solutions do). I'm positive of this since I don't have iconcache.db files anywhere on my OS drive.

我也试过通过VBS添加注册表项来代替,但是这并没有帮助。

I also tried adding the registry entries via VBS instead, but that didn't help.

任何批处理或VBScript的解决方案,欢迎!

Any batch or VBScript solutions are welcome!

推荐答案

通过关联的文件时,系统刷新的图标,所以我简单的解决办法只是这样的:

By associating files, the system refreshes the icons, so my simple solution was just this:

ASSOC .anyextension=anytype
ASSOC .anyextension=

第二排的关联扩展。

Second row disassociates the extension.

这篇关于更改和编程刷新图标(无需重新启动)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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