用vbs实现注册表开关的脚本
发布时间:2016-12-28 来源:查字典编辑
摘要:DimWSHShell,r,M,v,t,g,iOnErrorResumeNextSetWSHShell=WScript.CreateObje...
DimWSHShell,r,M,v,t,g,i
OnErrorResumeNext
SetWSHShell=WScript.CreateObject("WScript.Shell")
v="HKCUSoftwareMicrosoftWindowsCurrentVersion
PoliciesSystemDisableRegistryTools"
i="REG_DWORD"
t="注册表开关"
r=WSHShell.RegRead(v)
g=1
If(r=1)Theng=0
Ifg=1Then
WSHShell.RegWritev,1,i
M=MsgBox("是否限制注册表编辑器?",4,t)
Else
WSHShell.RegDeletev
M=MsgBox("是否解除注册表编辑器限制?",4,t)
EndIf