The Windows registry is a powerful tool that can be used to fix severe problems. But it can also cause severe problems. One wrong edit, in the wrong entry, can render a Windows machine unusable or worse — unbootable. So any user who attempts to edit the registry needs to do so with caution. To help prevent any registry disasters, here are five tips to keep in mind when considering an edit of the registry.
Note: This article is also available as a PDF download.
1: Back it up
This is critical. No matter what you are about to do in the registry, you should back it up. There are plenty of tools that can help you do this or you can use the built-in Regedit tool. But no matter how you do it, make sure you create a backup any time you're about to make change. To back up from within Regedit, just open it up, select the root key (the one containing all your registry subkeys), click File > Export, and provide a name and a location to save the file.
2: Use Regedit Export/Import
One of the best ways you can play it safe is to always export a particular key (or branch) before you make any edits. This is similar to backing up your registry, but by exporting a single branch, you can then open it in Notepad to examine its contents. Make your changes to that registry branch and then import it back into the registry. Even more important, exporting branches from the registry allows you to become familiar with how registry keys work WITHOUT making changes to the working registry.
3: Pay close attention to what you are doing
This should go without saying, but it bears a reminder. If you've found a machine that is having trouble and you've tracked that trouble down to a registry key, you know the next task is to edit that key to resolve the issue. Here's the thing. We often do things in haste. With the registry... you don't want to do that. You want to take your time and make sure the key you're about to edit or delete is the one you're supposed to edit or delete. Also, make sure the change you're about to make on that key is the CORRECT change. Don't jump into editing the registry all cavalier and haphazard. Take your time. Pay attention to detail.
4: Get to know the Regedit Find tool
Some subkeys are buried deep within the bowels of the registry, and they can be a challenge to find. And when you need to make sure every entry of a certain item is deleted, you don't want to have to manually search through the registry for them. The registry is large, so you need to use the Find tool. Using it is much like using Find in any other application. You can open it using [Ctrl][F], enter your search string, and have your results in moments.
5: Be careful when deleting registry keys from the command line
If you don't want to bother with using Regedit to delete a key (or if, for some reason, Windows graphical mode will not come up) — and you know with 100% certainty which key you want to delete — you can delete that key from the command line. The basic structure of the command to delete a registry key from the command line is:
RegEdit /l LOCATION_OF_system.dat /R LOCATION_OF_user.dat /D REGISTRY_KEY_TO_DELETE
where LOCATION_OF_system.dat is the explicit path to the system.dat file, LOCATION_OF_user.dat is the explicit path to the user.dat file, and REGISTRY_KEY_TO_DELETE is the name of the key you want to delete.
You can also create a "delete" file with the contents:
REGEDIT4 [-HKEY_LOCAL_MACHINE\the key you want to delete]
Note the negative sign preceding the HKEY. Create this file and name it reg_delete. With this file in place (located in C:\Windows), issue the command RegEdit C:\Windows\reg_delete.
Bonus tip: Use a reliable cleaner
Always remember that the registry in Window is a crucial for your system. If it were not so important, there wouldn't be so many tools available to help you "clean" it. Just don't be fooled by the snake oils out there. Not all registry cleaners are what they say they are. If you plan to use such a tool, make sure you use a reputable one like CCleaner.
- Common Windows issues you can fix with a registry hack
- 10 cool registry edits and tweaks for Windows XP
- Repair your corrupted Windows registry file the easy way
Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.