When Virus in your computer to that automatically disable your registry editor to how to unlock them.
there are simply step here. 
Step 1: Restart your computer and start with safe mode 
Step 2: open cmd and type
following command
reg delete
HKCU\software\microsoft\windows\currentversion\policies\system /v
"DisableRegistryTools"
it will ask you for(Y/N)?  type Y.
Step 3: Run this another command:  
 HKLM\software\microsoft\windows\currentversion\policies\system
/v "DisableRegistryTools"
This will enable your registry
editor.
 Enjoy :)  
