-->
Searching...
Home , → enable/disable registry editor using visual basic script

enable/disable registry editor using visual basic script

Senin, 04 Juli 2011
Doug Knox has created a VBS Script which allows users  to easily enable and disable Registry Editor. Just download regedit tools.vbs and double click on it. This script reverses the current state of Registry Editor. If registry editing is set to enabled, this script will disable it and if it is disabled, it will enable it.

If the above link does not work, copy the code given below in Notepad and save the file as *.vbs or Registry Editor.vbs.

Option Explicit
Dim WSHShell, n, MyBox, p, t, mustboot, errnum, vers
Dim enab, disab, jobfunc, itemtype
Set WSHShell = WScript.CreateObject("WScript.Shell")
p = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\"
p = p & "DisableRegistryTools"
itemtype = "REG_DWORD"
mustboot = "Log off and back on, or restart your pc to" & vbCR & "effect the changes"
enab = "ENABLED"
disab = "DISABLED"
jobfunc = "Registry Editing Tools are now "
t = "Confirmation"
Err.Clear
On Error Resume Next
n = WSHShell.RegRead (p)
On Error Goto 0
errnum = Err.Number
if errnum <> 0 then
WSHShell.RegWrite p, 0, itemtype
End If
If n = 0 Then
n = 1
WSHShell.RegWrite p, n, itemtype
Mybox = MsgBox(jobfunc & disab & vbCR & mustboot, 4096, t)
ElseIf n = 1 then
n = 0
WSHShell.RegWrite p, n, itemtype
Mybox = MsgBox(jobfunc & enab & vbCR & mustboot, 4096, t)
End If
After running the VBS file, if Registry Editing is not enabled, try restarting your PC.

Advertise Here
www.computers-skill.blogspot.com
300x250

0 Komentar Untuk "enable/disable registry editor using visual basic script"

Terimakasih atas komentar Anda di "enable/disable registry editor using visual basic script"