1 Enable & Disable Registry Editor [Tips & Tricks] 8th May 2010, 1:39 pm
kyawzwathant
MITR Reader
ေအာက္မွာပါတဲ့ဟာ အကုန္လံုးကို Notepad နဲ႔ကူးပါ RegisryTool.vbs ဆိုတဲ့ နာမည္နဲ႔ သိမ္းၿပီး Run ၾကည့္ပါ။
enable registry ကို disable registry ။။ disable registry ကို enable registry လုပ္ေပးႏိုင္ပါတယ္။
[You must be registered and logged in to see this link.]
enable registry ကို disable registry ။။ disable registry ကို enable registry လုပ္ေပးႏိုင္ပါတယ္။
[You must be registered and logged in to see this link.]
- Code:
Option Explicit
'Declare variables
Dim WSHShell, rr, rr2, MyBox, val, val2, ttl, toggle
Dim jobfunc, itemtype
On Error Resume Next
Set WSHShell = WScript.CreateObject("WScript.Shell")
val = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools"
val2 = "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools"
itemtype = "REG_DWORD"
jobfunc = "Registry Editing Tools are now "
ttl = "Result"
'reads the registry key value.
rr = WSHShell.RegRead (val)
rr2 = WSHShell.RegRead (val2)
toggle=1
If (rr=1 or rr2=1) Then toggle=0
If toggle = 1 Then
WSHShell.RegWrite val, 1, itemtype
WSHShell.RegWrite val2, 1, itemtype
Mybox = MsgBox(jobfunc & "disabled.", 4096, ttl)
Else
WSHShell.RegDelete val
WSHShell.RegDelete val2
Mybox = MsgBox(jobfunc & "enabled.", 4096, ttl)
End If