Everywhere you turn you find someone telling everyone to stay clear of the Registry. While I agree with this to an extent, I have come to realize that a lot of what we do involves the Registry whether we know it or not. If your looking to customize your Windows Operating System at some point you are going to have to deal with the Registry. If you are a novice, you may want to read this post on Windows Registry Basics.
Windows Registry Editor
If you are uncomfortable messing around the Registry then I would never say that you should mess with it. If your a user who loves to customize your Windows Operating System then the truth is, whether you do it manually or use some freeware program to customize with – it all deals with the Registry and is unavoidable.
This list of tips to work with the Registry, I hope, will ease your discomfort some and make it a little bit easier to manage. But remember, if you are unsure, its best to stay away from it.
Access or open the Windows Registry
You of course will use the built in registry editing utility called Regedit to handle Registry which you can access by the following locations:
- Hit the Start Button > Run > type Regedit and hit enter.
- Open the Task Manager > File > New Task > type Regedit and hit enter.
- In a Command Prompt type Regedit and hit enter.
Create a desktop shortcut to open Windows Registry
If you prefer you can add a shortcut to the desktop to Regedit by doing the following:
- Right-Click a blank area on the desktop, press New and then press Shortcut. For Location type Regedit click next and choose a name for your Shortcut and finally click Finish.
Files with .reg extension
Downloaded a file with the extension .reg but you are unsure of what it may do? Right-Click the file and select Edit or Open in Notepad and you will be able to see the location of the Registry key it will manipulate.
For Example the following .reg file when opened in Notepad will look like the following with the location in bold and values underneath.
[HKEY_CURRENT_USER\Software\Microsoft\InternetExplorer\Main\WindowsSearch] "Version"="6.1.7600.16385" "User Favorites Path"="file:///C:\\Users\\Lee\\Favorites\\" "UpgradeTime"=hex:fe,27,f3,41,02,91,cc,01 "ConfiguredScopes"=dword:00000005 "LastCrawl"=hex:3e,26,a3,a1,cd,90,cc,01 "Cleared"=dword:00000001 "Cleared_TIMESTAMP"=hex:23,9d,94,80,24,48,cc,01
If you are unsure of what the .reg file is going to do you can always copy the location and do a search online for it.
Backup before touching the Windows Registry
If you are working in Regedit there are a number of things you can do easily, to avoid messing up with the Registry.
- Before making changes to the Registry it is always recommended to quickly create a System Restore Point first, as this will enable you to return to the previous state before you did changes.
- If you would like to create a backup of a Registry key or Export the key to share with someone else, Right-Click the key and select Export, choose a name and add .reg as the format. You can also backup the Registry using freeware Regback or ERUNTgui.
Change, Add, Rename keys in Windows Registry
- If you are wanting to change settings to a Registry key, you can do so easily by Double-Clicking the value you wish to change and add the changes you wish.
- Renaming Registry keys : You need only Right-Click the key or value and select rename.
- To Add a key Right-Click the key you wish to add as a subkey and select New Key, the same with values.
Take ownership of Registry keys
If you find yourself trying to manipulate a Registry key and get an error that you do not have Permission to do, Right-Click the Registry key and select Permissions. 9 out of 10 times when you do this you will need to Take Ownership of the Registry key first before giving yourself elevated permissions. To Take Ownership, while you are in the Registry key properties window, click Advanced\Owner and if your username is not listed select Other Users or Groups and enter your username in the text box. Next click Check Names to make sure you have entered the correct username. Click OK and then you can change permissions. Learn more on how to take full ownership of registry keys.
One thing to note: If you plan on restoring ownership and permissions, take note first of the original owner and permissions. The following is the default owners list to use when selecting an owner in Other Users or Groups:
- Trusted Installer : Type in NT SERVICE\TrustedInstaller, click Check Names then click OK.
- System : Type in System, click Check Names and then click OK.
- Administrators : Type in Administrators, click Check Names then click OK.
- Your Username : Tye in Your Username, click Check Names then click OK.
- Users : Type in Users, click Check Names then click OK.
Add Registry keys to Favorites
One feature I really like with Regedit is Favorites. As I tend to work a lot within the same areas in the Registry, adding the keys to Favorites helps to get to these keys quickly.
To add a Registry key to Favorites, simply select a key go to the top menu and select Favorites\Add to Favorites.
Once done you will see a entry under Favorites that you need only click when you wish to go to that Registry key.
If you know the Registry key you are looking for and do not wish to click through Regedit, select Edit > Find and type the location to quickly navigate to the Registry key.
Using Command Prompt to manipulate the Registry
If you are more comfortable working in a Command Prompt the following commands can be used to handle the Registry:
- Reg add : Adds a new subkey or entry to the Registry.
- Reg compare : Compares specified registry subkeys or entries.
- Reg copy : Copies a subkey to another subkey.
- Reg delete : Deletes a subkey or entries from the Registry.
- Reg export : Creates a copy of specified subkeys, entries, and values into a file in REG (text) format.
- Reg import : Merges a REG file containing exported Registry subkeys, entries, and values into the Registry.
- Reg load : Writes saved subkeys and entries in hive format back to a different subkey.
- Reg query : Displays the data in a subkey or a value.
- Reg restore : Writes saved subkeys and entries in hive format back to the Registry.
- Reg save : Saves a copy of specified subkeys, entries, and values of the Registry in hive (binary) format.
- Reg unload : Removes a section of the Registry that was loaded using reg load.
Example: Reg query HKLM\Software will list all the subkeys
In a Command Prompt if you type in Reg /? it will list the available commands.
There are several other built in Command Line tools in Windows for more advanced users as well such as Regini,but I’ll leave those to another post and keep this for basic use. By the way, if you have wondered where the Windows Registry files are located on the disk, go here to find out!
Tools to make handling Registry keys easy, for users, without a lot of knowledge:
- Our own RegOwnit which can set Ownership and Permissions on Registry keys without opening Regedit.
- RegMajik : A replacement to Regedit that offers a lot of features not found in Regedit.
- SetACL : A Command Line tool which makes it easier to change Permissions and Ownership for Registry keys. On the more advanced side but once you learn the commands it’s pretty easy to use.
- Registrar Registry Manager, a powerful free manager for Windows Registry.