用vbs实现注册表开关的脚本
时间:2020-12-04 03:54:42|栏目:VBS|点击: 次
Dim WSHShell,r,M,v,t,g,i
On Error Resume Next
Set WSHShell=WScript.CreateObject("WScript.Shell")
v="HKCU\Software\Microsoft\Windows\CurrentVersion\
Policies\System\DisableRegistryTools"
i="REG_DWORD"
t="注册表开关"
r=WSHShell.RegRead(v)
g=1
If (r=1) Then g=0
If g=1 Then
WSHShell.RegWrite v,1,i
M=MsgBox("是否限制注册表编辑器?",4,t)
Else
WSHShell.RegDelete v
M=MsgBox("是否解除注册表编辑器限制?",4,t)
End If