Clean your Windows registry

The Windows registry may be the least understood tool in Windows. At the same time, it is the most useful for those who like to tweak and fiddle with the operating system manually. For most people, though, just the sight of the registry is enough to make them stand back in horror, kind of like Macaulay Culkin in Home Alone.

For all of its ominous menus and its strange appearance, though, the registry is not as complicated as you might think.

Compare it to a Windows brain. When you are first born, your brain is relatively free of information and knowledge. As you are growing up, finding interests and learning, the brain becomes filled with critical information that helps you understand the world around you and perform daily tasks. So it is with the Windows registry.

So what's inside? When you install a program on your computer, Windows adds critical information about the program, as well as where it is stored and what files it opens or can change. Of course, that's not all. Windows keeps the following information in the registry:

  • User information like the account name and account icon
  • Property settings for each folder
  • Hardware information such as the type of processor in the machine (for instance, Intel Pentium or AMD Athlon), as well as the mouse and keyboard brands, to name a few
  • Ports 'or entry and exit points for data to pass through' that are in use
  • System information including BIOS version and the installed Windows operating system
  • Devices connected to the computer such as external hard drives or an iPod.
  • The configuration of the computer in its present state. This can include such information as the colour scheme of the Windows interface and the chosen font displayed on all of the windows.
  • Installed software with information containing versions, updates, as well as its respective location on the hard drive.

Now that you know what it does, let's go inside and have a careful poke around. If you like, try following along on your computer. To get started, let's open up the registry with a program called regedit. Click Start, then Run. Type regedit into the dialog box and click OK. The registry editor will open.

WHAT’S IN THE REGISTRY?

When you first enter the registry, you immediately see a panel on the left side with five headings in a “tree-view” format and a panel on the right side that will show the information in the given folder. Following along the lines of the previous example, think of the five sections on the left ' each beginning with HKEY (for “Handle to a Key”) — as five drawers in a filing cabinet, each with its own unique function and content.

HKEY_CLASSES_ROOT (HKCR) contains information about registered applications and file extension associations. In other words, HKCR tells you which file extensions, such as .doc or .xls, correspond to given programs on your computer (in this case, Microsoft Word and Microsoft Excel, respectively), as well as various pieces of information regarding the software on your computer. Applications lookup values in the HKCR section to find preference settings and version information before the program starts. Any changes made to a program are immediately saved in this directory.

HKEY_CURRENT_USER (HKCU) stores all of the information and preferences regarding the user who is currently logged on. Continuing our brain example, HKCU is like a biography. It reflects your preferences for how the operating system looks (for example, Windows classic view or the default Windows XP look), user settings such as desktop theme and screen savers, and all other information about your account. Any changes made to the user account get saved in this area of the registry. They might include something as simple as changing your desktop background, or as complex as manually changing Windows’ appearance.

The third heading is HKEY_LOCAL_MACHINE (HKLM). It contains settings that are common across the whole computer and shared by all of the users on the machine. It contains hardware, security, and system information to name a few. HKLM acts as the centerpiece of the entire registry. It is the location where most manual cleaning will be done.

Just below HKLM is HKEY_USERS (HKU). HKU keeps all of the individual information found in HKEY_CURRENT_USER under one tab. If HKCU is representative of your biography, then HKU is representative of each individual's biography in your family. All of the information that is kept in HKCU mirrors information about a given user in HKU.

Finally, let's look at HKEY_CURRENT_CONFIG (HKCC). HKCC contains all the information gathered when the computer is booted up. Unlike the previous headings, HKCC information is entirely new each time the machine is turned on and removed when the machine is shut down. Common information stored in HKCC includes fonts and Internet options. Typically, you touch this section only rarely when the time comes to clean the registry.

WHY CLEAN THE REGISTRY?

As time goes by, the registry becomes filled with increasing amounts of information, including a lot of junk. Unnecessary and obsolete information fragments clutter the registry and this can create a drastic loss in performance. This can slow system response, cause frequent crashes, and create a variety of software problems, such as recurrent shutdowns and slow program response.

Also, when you uninstall a program, it may seem gone, but many uninstallers leave remnants of a program in the registry.

Before you begin, it’s important to understand that cleaning the registry manually can be dangerous. A misstep, deleting or changing the wrong registry values, can create an unstable Windows environment leading to crashes.

So it's a good idea to make a backup of all the data on your computer before performing any work with the registry, so you can undo any damage if you do make a mistake.

There are two ways to back up the registry to protect yourself. You can either create a restore point using Windows System Restore, or export and save a copy of the registry to another location on the computer.

Creating a restore point to backup the registry is the simplest approach. By creating a restore point, the computer effectively takes a snapshot of the entire computer at that moment and saves it in the event something has gone wrong and it is necessary to revert back to that point.

Here's how to create a restore point in Windows XP or Windows ME using a program called System Restore. (System Restore is not available on Windows 98 or 95,)

  1. Click the Start button to open the Start menu.
  2. From here, choose All Programs, then Accessories.
  3. Next, choose System Tools, then click System Restore.
  4. In System Restore, choose Create a restore point, and click Next. Note the button that says Restore my computer to an earlier time. This would be used to put the computer back to the way it was after a mistake occurred.
  5. Give the restore point a brief description and click Create. The restore point is created and is tagged with the date and time.

A second option for creating a backup of the registry is to export part (or all) of the registry and save it elsewhere in the computer. Here's how to do that:

  1. Open regedit by clicking Start, then Run, and type regedit into the dialog box, and click OK.
  2. In the registry editor, click File at the top, then Export.
  3. Give the file a name and choose to save either the whole registry (the All button under Export range) or just the selected branch.
  4. Click Save and the registry will be saved in the specified folder.

REGISTRY EDITING BASICS

Performing manual changes to the registry is as easy as clicking folders, just like you would in Windows Explorer.

To select a folder, choose the value on the right and click Delete. If you want to delete an entire folder, simply right-click the folder and click on Delete to permanently remove that folder from the registry. Because this operation is so simple, be sure you are not deleting the wrong value.

Let's walk through an example to illustrate just how easy it is to remove an entry in the registry. In this case, let's remove an unneeded file extension called .in_.

  1. First, click the drop-down box next to HKEY_CLASSES_ROOT.
  2. Scroll down to .in_ and right-click on the folder.
  3. Click Delete.
  4. At the next prompt, click Yes to permanently delete this key and all of its subkeys.

WHAT SHOULD I CLEAN?

There are several areas in the registry that can be cleaned manually. They include:

  • File extensions that are not used by any programs (.in_ for example)
  • Remnants of software that was never fully deleted
  • Duplicate files
  • Spyware or viruses that have embedded themselves in the registry
  • Outdated hardware drivers

HOW TO CLEAN THE REGISTRY SAFELY

As easy as manual removal and cleaning is in the registry, a much safer choice is to use registry cleaning software. These registry cleaners help eliminate much of the risk when you attempt to clean the registry manually, and often tell you what is safe to remove. Still, they are not entirely fool-proof.

Registry cleaning utilities don't always tell you what they’re doing. Sometimes they will recommend removing programs or information with little or no explanation of what or why. Although the registry cleaner may say that a particular registry value is removable, it can very easily be wrong, so it’s important not to trust the registry cleaner implicitly. Quite often, 'removable' programs or files are mixed in with files or programs that should not be deleted. Unfortunately, it is necessary to go through all of the problems presented (as numerous as they may be) in order to be sure nothing will be removed that should be kept.

RECOMMENDED PROGRAMS

RegCleaner

RegCleaner provides users with various tabs to browse and allows them to delete the registry values under them as they wish. It also provides them with directions on what to delete and what should be left alone. The program also provides options to uninstall or remove software, add or remove programs from the startup list, delete file extensions that have no program associations, and remove shell extensions. Perhaps most beneficial, the program has a backup tab where the original state of the registry is saved after each change in the event the user makes a mistake and wants to restore a deleted value.

The one downside to RegCleaner is that the interface is not as friendly as it could be, and is sometimes confusing when you are unsure of the value in question.

Bottom line: RegCleaner is a fine program that works very well for those people who just don’t have the time (or energy) to clean a registry manually. Lacking a clean interface and a scanning option, it is far from great, but it's free!
Price: Free. Get it here.

RegistryBooster 2

RegistryBooster 2 does everything expected of a registry cleaner, and then takes it to a whole new level. With a slick interface and the ability to scan, repair, backup, and defragment the Windows registry, it is a one-stop shop for registry repair. Upon scanning the registry for problems and errors, the program gives the option of backing up the registry before making changes. This feature alone helps alleviate any worries of deleting the wrong value and being left with a very expensive paper weight. On top of all this, Registry Booster cleans up the system quickly and efficiently at a very fair price. With a free trial and great defragmenting performance, Registry Booster is an ideal solution for anyone looking to clean the registry and improve performance.

Bottom Line: RegistryBooster 2 sports a great look and even better performance. With scanning and defragmenting utilities that outshine the competition, and a free trial to boot, RegistryBooster 2 sits at the top of the list. Unlimited fixes would have been nice in the trial period, though.
Price: Free trial, $29.95 to buy. Buy it now.

CleanMyPC Registry Cleaner

Although not as good as RegistryBooster 2, CleanMyPC Registry Cleaner 3 is a fine utility for anyone looking to clean up and repair a hobbled registry. CleanMyPC Registry Cleaner 3 has a great interface and a design that’s clean and easy to use. It also scans the computer for any problems it finds in the registry. It would be useful if the software included the option to back up the registry after the scan and before changes are made. CleanMyPC Registry Cleaner 3 does most of what the other registry utilities do, but throws in startup and Internet Explorer organizers that automate Internet Explorer internet options as well as the programs that are allowed to start when the system boots up. With a nice set of options and efficient cleaning utilities, CleanMyPC Registry Cleaner 3 is a great option for those willing to shell out money to clean the registry.

Bottom Line: Although CleanMyPC Registry Cleaner 3 is not the best solution for registry cleaning (see RegistryBooster 2 above), it certainly is a good utility for working on the registry. Even though it doesn’t include the automatic backup option offered by RegistryBooster 2, it’s still a great solution for someone who does not want to fix a registry manually.
Price: Free trial, $29.95 to buy. Get it here.