另外:注册表导入后,刷新的方法: 1、最有效的:
结束explorer.exe,缺点时资源管理器被关,有些窗口被关,出现无任务栏桌面状态,虽然可以生效,但不推荐。
[ Copy ] [ Run ] [ Save ]
Do
ProcessClose("explorer.exe")
Until Not ProcessExists("explorer.exe")
2、调用SendMessageTimeout。效果不理想。
[ Copy ] [ Run ] [ Save ]
DllCall("user32.dll","int","SendMessageTimeout","hwnd",65535,"int",26,"int",0,"int",
0,"int",0,"int",1000,"str","dwResult")
3、调用组策略刷新设置工具,测试无效
[ Copy ] [ Run ] [ Save ]
Run("gpupdate /force",@SystemDir)
4、又一刷新
注册表的API,非常强捍。效果不错
[ Copy ] [ Run ] [ Save ]
DllCall("shell32.dll", "none", "SHChangeNotify", "long", 0x8000000, "int", 0, "ptr", 0, "ptr", 0)
5、刷新桌面
[ Copy ] [ Run ] [ Save ]
RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters
6chinanewxp的函数,可以刷新
注册表改文件图标后即时生效。
[ Copy ] [ Run ] [ Save ]
MyUpdateREG()
Func MyUpdateREG()
Global Const $HWND_BROADCAST=0xFFFF
Global Const $WM_SETTINGCHANGE=0x1A
DLLCall("user32.dll","int","SendMessage","hwnd",$HWND_BROADCAST,"int",