Using VBS to realize the script of registry switch

Time:2020-10-14

 
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 = registry switch
r=WSHShell.RegRead(v)
g=1
If (r=1) Then g=0
If g=1 Then
WSHShell.RegWrite v,1,i
M = msgbox (“restrict registry editors?”, 4, t)
Else
WSHShell.RegDelete v
M = msgbox (“remove registry editor restrictions?”, 4, t)
End If

Recommended Today

Write a framework with ioc-aop-mvc function from scratch — learning notes — 10. The writing of MVC result render

1. What should be done in this chapter Complete the writing of request processor interface Finish writing the interface of resultrender Finish the writing of default render class of faultresultrender Complete the writing of the internal exception render class of internalerrorresulterrender Complete the jsonresultrender JSON render class Complete the writing of the render class used […]