Open your registry and find the key below.
Create a new DWORD value named 'DisableRegistryTools' and set the value to '1' to disable registry editing functions. This can also be enabled on a user-by-user basis by putting the same value in the [HKEY_CURRENT_USER] hive.
Restart Windows for the change to take effect.
If you have inadvertently locked yourself out of your registry you can use usually use WinGuides Tweak Manager to unlock it. Please don't abuse this by trying to circumvent system administrator policies.
Value Name: DisableRegistryTools
Data Type: REG_DWORD (DWORD Value)
Value Data: (0 = allow regedit, 1 = disable regedit)