用vbs实现注册表开关的脚本
程序员文章站
2024-03-30 22:00:51
dim wshshell,r,m,v,t,g,i on error resume next set wshsh...
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