12月142015
AU3的强制注册表刷新
Do
ProcessClose("explorer.exe")
Until Not ProcessExists("explorer.exe")
Run("gpupdate /force","",@SW_HIDE)```
```<code class="language-autoit hljs">
;其他做法:使用dllcall调用相关API
DllCall("user32.dll","int","SendMessageTimeout","hwnd",65535,"int",26,"int",0,"int",0,"int",0,"int",1000,"str","dwResult")
;或者
Dim $Return
$Return = DllCAll("Userenv.dll","int","RefreshPolicyEx","int",1,"int",1)
If IsArray($Return) Then
If $Return[0] <> 0 Then
MsgBox(0,"","操作成功.返回值:" & $Return[0])
Else
MsgBox(0,"","操作失败.返回值:" & $Return[0])
EndIf
EndIf
Exit
当然帮助文件中貌似也有
#Include <WinAPI.au3>
WinActivate ("[CLASS:CabinetWClass]")
_WinAPI_PostMessage(ControlGetHandle("[CLASS:CabinetWClass]", "", "SysListView321"),256,116,0); 刷新我的电脑
_WinAPI_PostMessage(ControlGetHandle("[CLASS:Progman]", "", "SysListView321"),256,116,0);刷新桌面
以上内容,希望对您有所帮助!```
<p>
<br />
</p>
扫描二维码,在手机上阅读
发表评论
木有头像就木JJ啦!还木有头像吗?点这里申请属于你的个性Gravatar头像吧!