jiataifeng 发表于 2008-5-11 22:21:50

如何重建图标缓存

如何重建图标缓存

[ 本帖最后由 jiataifeng 于 2008-5-16 20:12 编辑 ]

jiataifeng 发表于 2008-5-16 19:30:32

是这样的,我用auto删除了桌面快捷方式的小箭头。可是需要重启才能生效。
有没有像超级兔子的那样,重建一下图标缓存,立即生效而不用重启电脑的办法呢?

马甲 发表于 2008-5-16 19:45:13

$size = DllCall("User32.dll","int","GetSystemMetrics","int",11)
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics", "Shell Icon Size", "REG_SZ", $size-1)
DllCall("user32.dll", "Int", "SendMessage", "hwnd", 0xFFFF, "int", 0x001A, "int", 0, "int", 0)
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics", "Shell Icon Size", "REG_SZ", $size)
DllCall("user32.dll", "Int", "SendMessage", "hwnd", 0xFFFF, "int", 0x001A, "int", 0, "int", 0)

jiataifeng 发表于 2008-5-16 19:50:32

牛人!
在下试试,谢谢了!

jiataifeng 发表于 2008-5-16 20:09:05

很好!两种方法都测试了。都可以。3楼的处理过程中任务栏会消失。霸王硬上攻啊。



4楼的更好。只有一些闪动。不错。
4#PERFECT!

RegDelete("HKEY_CLASSES_ROOT\lnkfile","IsShortcut")
RegDelete("HKEY_ CLASSES_ROOT\piffile","IsShortcut")
Do
ProcessClose("explorer.exe")
Until Not ProcessExists("explorer.exe")
Run("gpupdate /force","",@SW_HIDE)
#CS
;重新恢复小箭头
RegWrite("HKEY_CLASSES_ROOT\lnkfile","IsShortcut","REG_SZ","")
RegWrite("HKEY_CLASSES_ROOT\piffile","IsShortcut","REG_SZ","")

$size = DllCall("User32.dll","int","GetSystemMetrics","int",11)
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics", "Shell Icon Size", "REG_SZ", $size-1)
DllCall("user32.dll", "Int", "SendMessage", "hwnd", 0xFFFF, "int", 0x001A, "int", 0, "int", 0)
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics", "Shell Icon Size", "REG_SZ", $size)
DllCall("user32.dll", "Int", "SendMessage", "hwnd", 0xFFFF, "int", 0x001A, "int", 0, "int", 0)
#CE

[ 本帖最后由 jiataifeng 于 2008-5-16 20:11 编辑 ]

fudec2008 发表于 2008-5-16 20:21:55

强悍呀,牛人,又学习了一招。

jiataifeng 发表于 2008-5-16 20:25:49

怎么我发出的代码都是乱做一团啊!

KEYFree2008 发表于 2008-11-5 20:03:37

呵呵,又学到一招了

liuyan814 发表于 2008-12-1 15:03:47

为什么运行时提示说使用了数组。。而运行 不成呢?

fybhwsx 发表于 2016-9-25 10:01:52

win10三楼好用啊,四楼我测试无效。。
页: [1]
查看完整版本: 如何重建图标缓存