Dim WSHShell, r, m, v, t, g On Error Resume Next Set WSHShell=WScript.CreateObject("WScript.Shell") r=WSHShell.RegRead(v) If (r=1) Then g=0
Dim i
v="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr"
i="REG_DWORD"
t="任务管理器开关"
g=1
If g=1 Then
WSHShell.RegWrite v,1,i
m=MsgBox("是否限制任务管理器?",3,t)
Else
WSHShell.RegDelete v
m=MsgBox("是否解除任务管理器限制?",3,t)
End If