|
网上邻居上爱显示最近访问的共享文件夹记录,我想通过代码删除,请求各位大师的VBA代码。
- Sub 禁止显示文件记录()
- Dim wsh As Object, Tree$
- Set wsh = CreateObject("wscript.shell")
- Tree = "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoRecentDocsNetHood"
- wsh.RegWrite Tree, 1, "REG_DWORD"
- MsgBox "修改成功"
- Set wsh = Nothing
- End Sub
- Sub 允许显示文件记录()
- Dim wsh As Object, Tree$
- Set wsh = CreateObject("wscript.shell")
- Tree = "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoRecentDocsNetHood"
- wsh.RegWrite Tree, 0, "REG_DWORD"
- MsgBox "修改成功"
- Set wsh = Nothing
- End Sub
复制代码
|
|