(1)禁止“运行”菜单;
Set objShell = CreateObject(“WScript.Shell”)
strKeyPath = “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer”
strValueName = “NoRun”
’ 设置禁用运行菜单的数值为1
objShell.RegWrite strKeyPath & “” & strValueName, 1, “REG_DWORD”
’ 刷新资源管理器以使更改生效
objShell.Exec “taskkill /im explorer.exe /f”
WScript.Sleep 1000
objShell.Exec “explorer.exe”
(2)禁止“显示桌面所有图标”;
Set objShell = CreateObject(“WScript.Shell”)
strKeyPath = “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer”
strValueName = “NoDesktop”
’ 设置禁用显示桌面所有图标的数值为1
objShell.RegWrite strKeyPath & “” & strValueName, 1, “REG_DWORD”
’ 刷新资源管理器以使更改生效
objShell.Exec “taskkill /im explorer.exe /f”
WScript.Sleep 1000
objShell.Exec “explorer.exe”