Registry editing has been disabled by your administrator. How to enable it?

In many companies, the employers have disabled the registry editing by default. The message "Registry editing has been disabled by your administrator", pops up if you execute regedit.exe, even if you have administrator privileges. Even though there are some good intentions behind it, it can be really frustrating at times if you want to make some changes for good. The good news is that, you can enable it, if you have administrator privileges.

The basic idea behind this is, windows saves all the registry items like keys, values etc in a few database files. In winows XP/Vista, these database files are located in C:\Windows\System32\Config. The file names are

  1. default
  2. sam
  3. security
  4. system
  5. software.

These files are protected by operating system and you won't be able to see its contents.

Regedit.exe (C:\Windows\regedit.exe), is just a program used to view/edit the data inside these database files. So usually what the system admins will do is, disable the Regedit.exe program. (Regedit.exe can be disabled by setting a key in registry. The key name is 'DisableRegistryTools' which can be found under the path ' HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System'. If the value of this key is set as '00000002', it will disable Regedit.exe; if the value is '00000000', it will enable Regedit.exe. The data type of this value is DWORD).

The method explained here uses a command line tool called 'Reg.exe' (Complete path is ' C:\Windows\System32\reg.exe'). Reg.exe is a tool which can be used to import and export registry values. Using this tool we will change the "DisableRegistryTools" key value from '00000002' to '00000000', to enable Regedit.exe. Following is a step by step procedure to do it (Make sure you take a backup of registry, so that if anything goes wrong, you can restore it to original state. Please check other articles in this section to find out how to backup your registry)

Windows XP Users 

  1. Take a backup of your registry
  2. On the Command Prompt, execute the following command to export the 'DisableRegistryTools' key value
    reg export "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" "c:\export_file.txt"
  3. Open the file 'C:\export_file.txt' using notepad or wordpad. The file will look like the followingRegistry Editing Disabled

    If the dword value is not "00000002", then your registry is disabled from some where else. To find out go to the below section "Enable Registry Editor" from Group Policy Editor

  4. In this text file, change the value "00000002" to "00000000" and save the file.
  5. On the Command Prompt, execute the following command to import the changed file back to the registry
    reg import "c:\export_file.txt"
  6. Now restart explorer and run Regedit.exe.

Note: The above method will work for Windows XP only. In windows vista, if you try to execute these commands, you will get an error "Registry editing has been disabled by your administrator", which is correct. Then ???? Microsoft might have forgotten to add this verification to Reg.exe in Windows XP, who knows???. I don't know if Vista users, copy the C:\Windows\System32\reg.exe from an XP machine, then try the above steps, it might work. Its worth giving a try... 

Windows Vista Users 

As mentioned in the above note, Reg.exe cannot be used in Windows Vista, to import and export registry keys, if registry editing is disabled. So one possible way is to write a small vb script file to change the value of "DisableRegistryTools". Following is the vb script. Comments are provided to better understand what each line of script does.

'In case of error, continue script 
'execution from the next line onwards
On Error Resume Next

'Declare variables
Dim objshell, regKey, value

regKey = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools"

'Creating a shell object
Set objshell = WScript.CreateObject("WScript.Shell")

'Getting the current value of this key
value = objshell.RegRead(regKey)

'If the key does not exist, the above line will generate an error
If Err.Number <> 0 Then
	'If the key does not exists, registry is disabled from some where else
	'So just end the script, without doing anything
	WScript.Quit
End If

'If current value is 0, then also the registry is disabled from somewhere else
'So just end the script, without doing anything
If value == 0 Then
	WScript.Quit
End If

If value = 2 Then
	'Current value of 'DisableRegistryTools' is 2, so change it to 0
	objshell.RegWrite regKey, 0, "REG_DWORD"
End If

WScript.Echo("Registry is now enabled")
  1. Create a file named "regedit.vbs" on your desktop.
  2. Open the file in notepad and copy paste the above script and save it.
  3. Double click on the file to execute the script
  4. Registry is now enabled

Note: You don't have to restart the computer in order to see the changes. You can restart just the explorer shell as the following

  1. Press Ctrl + Alt + Del to start the Task Manager and go to "Process" tab.
  2. Select "explorer.exe" in Task Manager (not iexplorer.exe, which is internet explorer"
  3. Click End Task/End Process. Your desktop will become invisible, thats fine.
  4. In Task Manager, go to "Applications" tab and click "New Task..". In the pop up box type "explorer" and hit enter. A new instance of windows explorer will start up.
  5. Thats all you need to do instead of restarting computer (in most of the times) 
Powered by Bullraider.com