Wednesday, November 26, 2008

The value:

The following values lock the registry editing tools when they are set to 1 (they are DWORD values) :

HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools for the current user and

HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools for all users (doesn't work on Windows XP though).

However, once one of them has been set to 1, you can't use regedit to simply remove them. So, here are 2 methods.


The methods

1. A reg file !

Tested and working on Win 2k, not working on Win XP.

You simply need to create and launch the following reg file :

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]
"DisableRegistryTools"=-

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System]
"DisableRegistryTools"=-



2. A VBS (Visual Basic Script)

Tested and working on Win 2k and XP.

In notepad, copy/paste the following script, and save the file with a .vbs extension, then go to cmd.exe and run it :


'Enable/Disable Registry Editing tools

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

6 Comments:

  1. lunaticg said...
    Hi!
    why do we need to lock the registry editing tools?

    Sorry for the stupid question. I am just a laymen when come to IT thingy.
    jamesmalibiran said...
    This comment has been removed by the author.
    angelo said...
    Simply..just to enable the registry editing tools..we enable also its capability to any computer users to register its registry files into its operating system registry..

    because there are several files that we need to register..and those files are the .reg files extensions...

    so that is it...
    jamesmalibiran said...
    ang, pde man pd mag.add lng kag shortcut.. specify lng nimo ang regedit.. ^^ kng wala lng gi.retrict ang right click.. hehe..
    angelo said...
    actually..kana ky no need to create the shortcut...instead you just copy the scripts to a notepad...

    and that is it... it is finish..


    that is just if the regedit is being disabled by the administrator...

    ...God bless
    manusia biasa said...
    interesting information. but I prefer to use VB script .... thank compositions.

Post a Comment



Template by : kendhin x-template.blogspot.com