How To Clean The Windows Registry
Keep PCs lean and mean by sweeping away broken references and other unwanted content.
Some experts have called the Windows Registry the heart, brain, mind, or even the soul of Windows. In a sense, they're right. The Registry is absolutely essential to the proper operation of any Windows machine. Conversely, a damaged or corrupt Registry invariably leads to a non-functioning computer.
The Windows Registry contains information pertaining to drivers and related settings for hardware components; key OS parameters; information about services, protocols, and application data; and much, much more.
In this TechBuilder Recipe, I'll describe how you can use a free, "crippleware" version of a Registry clean-up tool to identify content in need of removal from the Windows Registry. The utility both identifies and removes unused shortcuts, pointers to missing files, links to programs no longer in use, and more. While this software is a great inspection tool, you'll need to purchase a full-blown Registry clean-up utility to do the job right.
Why Bother?
Most Windows experts recommend a Registry clean-up on all systems at least once every six months. Essentially, this sweeps out remaining references to items that are either no longer used, or have been replaced by more-current entries. In fact, the experts recommend even more frequent clean-ups for machines on which lots of software or drivers are regularly installed and uninstalled -- two actions that are the primary culprits in creating unused or unwanted entries.
But care must be taken. If you clean the Windows Registry improperly, you can render the entire system inoperable. The Registry plays an essential role during Windows startup and operation. If you change, move, or delete the wrong Registry files, the system will get into trouble. For this reason, making a backup before cleaning or changing the Registry is not only a best practice, but also a very necessary form of CYA! This also explains why many Registry tools include built-in backup capabilities.
In fact, the Windows Registry includes its own built-in editor. To view the built-in Registry Editor, go to Start, Run, type regedit.exe, then click OK. This built-in editor is perfectly capable of taking you to wherever in the Registry you may wish to go, and to then create, alter, or remove any entries you like. But there's a problem with this approach: The typical Windows system has literally hundreds of thousands of Registry entries. Some are merely cryptic. Others are seriously enigmatic. Still others are fraught with exceptional peril.
What's missing from regedit is any source of intelligence about what to delete, what to change, and what to leave alone. It's also missing information about what's unused, out-of-date, or unreferenced on the desktop or the OS -- or missing from the applications.
Fortunately, there are hundreds of tools available to do this very job. So you're spared from needing to become a total expert on the hundreds of thousands of potential entries you might encounter in a Windows Registry. In fact, most Registry tools are smart enough to find potentially unused or questionable references, and then request user input on any entry that might cause a problem if removed.
If you're a system builder who provides installation, maintenance, or troubleshooting services, you'll find Registry clean-up tools a great addition to your kit. These utilities automate most of the clean-up process. They also make it easy to research potentially questionable or dangerous items. For example, if you decide to retain all iffy items -- so no research is required -- and only delete safe entries, then you can easily automate and script the entire process.
Some Registry clean-up utilities also include defragmentation tools. These basically make Registry files as contiguous as possible and make Registry contents as compact as possible. But remember that the Windows Registry is a huge, complex data structure; it resides in memory while the machine is running, and parts of it also reside in files to both drive start-up and preserve prior settings from one start-up to the next. So running these defrag tools can produce only modest performance gains.
Ingredients
To follow this recipe, you'll need the following components:
One or more Windows PCs.
Internet access for each PC you wish to scan. Any modern Web browser that lets you download an evaluation copy of the clean-up software you'll see used here. On my XP test machine, I used a post-SP2 version of IE 6.0. And I used an up-to-date version of IE 6.0 on my Win2000 test machines (with SP 4 and all subsequent security updates installed).
Belt and Suspenders
Before you change the Windows Registry in any way, first back it up. Working on a Windows XP system, you can create a new restore point as an extra form of insurance before you get started. First click Start, then Help, Support Center, and Undo Changes to Your Computer with System Restore. Next, click the radio button for Create a Restore Point. Click Next. Type a detailed description of the Restore Point like "pre-registry-changes-050228.13.22." Finally, click Create.
If the system you're working on runs a version of Windows other than XP, use the built-in Windows Backup utility instead. First click Start, then Run. Type ntbackup.exe, then click OK. Click Advanced Mode, then Backup Wizard, then Only Back up the System State Data. Use the same kind of name to date and time-stamp your Registry backup as recommended in the preceding paragraph (pre-registry-changes-050228.13.22), and put it on a drive where you know you can get to that data even if the machine you're backing up isn't running at that time. This might mean copying it to a shared drive on another PC elsewhere on your network, or to a USB or FireWire-based external drive.
Many Registry clean-up utilities let you back-up the Registry before you make any changes. Most also let you undo changes on a one-at-a-time or batch basis. But using these facilities requires a running computer! That's why I advocate this "belt-and-suspenders approach" of creating an extra-insurance backup before running any of these programs. Consider yourself warned.
Seven Steps To a Cleaner Windows Registry
While preparing this TechBuilder Recipe, I researched free Windows Registry clean-up tools by searching on strings like "free Registry clean-up" or "free Registry tune-up." But I didn't find any freeware that did an ace job on Registry Cleanup. (Be warned: the old, free, unsupported RegClean utility from Microsoft doesn't really work for Windows XP, either).
So I instead chose a "crippleware" version of a reasonably well-known, well-regarded tool called CleanMyPC Registry Cleaner. The first step in the recipe, in fact, is to visit the CleanMyPC Web site and download an evaluation copy of the software. Or, if you want to register and take full advantage of this product, it costs $30.
Regardless of what machine or Windows version you're working on, the general steps and methods remain the same. In fact, due to the limitations in this crippleware version, you're really "just looking" at what a Registry clean-up would entail. It doesn't get any safer than that!
Be sure to adapt these instructions to whatever Registry Cleaner finds in the Registry on the machine you're working on. Let's begin:
Step 1: Launch the machine's Web browser, and visit the Registry Cleaner download page. Copy the file into a directory where you can find it again! For this recipe's test machine, I stored the file in D:\downloads\software.
Step 2:The file named registry-cleaner.exe is a typical Windows install program. Either double-click the filename in Windows Explorer, or use the Run command to launch it: Start, Run, then type D:\download\software\registry-cleaner.exe into the Open textbox; then click OK.
Because this software lacks a publisher certificate, Windows XP security will ask whether you really want to install it, as shown below. Since we're going to remove RegistryCleaner in the final step of this recipe, go ahead and click the Run button for now.
Step 3: The next series of screens runs you through the installation process, which is based on the well-known Windows Installer tool set (which is built around setup.exe, like so many Microsoft products). To finish, you'll need to agree to license terms; select a destination directory; choose a Start menu folder name; manage icons; and then click the Install button. If you let all the defaults stand, installation should take less than a minute, as you step through several more screens to designate a target directory for install files, and to allow or deny creation of a desktop icon for the program. When you get to the final screen, click the Finish button at the end, the program opens automatically, as shown below:
Since the software is smart enough to recognize that it hasn't been used before, it will ask whether you want to make a Registry backup from the get-go. This wins extra points in my book, especially when compared with other evaluation software I tested. Go ahead and click Yes. The process usually takes only a minute or two, even on a machine with lots of software and hardware, and thus a huge Registry.
Step 4: On the program-entry screen that shows up when CleanMYPC--Registry Cleaner is launched, you'll see icons in the left-hand menu labeled Scan & Clean, Backup & Restore, Startup Organizer, and Internet BHO Organizer.
Scan & Clean is where you go to work on the Registry's contents. Backup & Restore lets you perform those operations on the Registry. Startup Organizer lets you see and manage Registry keys related to what happens when your PC starts up. And BHO Organizer shows you any and all Browser Helper Objects; basically, these are code plug-ins and toolbars that extend your Browser's capabilities, like the Adobe Acrobat reader, or an anti-spyware monitor or pop-up blocker.
Though all the organizers are interesting, we'll focus on Scan & Clean and Backup & Restore because they're most germane to Registry clean-up tasks. You can also use buttons in the primary right-hand pane for scanning (Check Registry), backup and restore (Backup Registry), or to access online help (Online help) information. Here's a view of the main program-entry screen:
Step 5: In the right hand pane on the program entry screen shown in the preceding figure, click the Check Registry button or the Scan & Clean icon to commence a scan of your system's Registry. Note the checkboxes in the resulting right-hand pane cover all kinds of Registry contents:
Registry integrity: Checks the integrity and consistency of Registry contents.
COM/ActiveX Entries: Checks information about active content and other code elements installed in the Registry.
Font Entries: Checks fonts listed in the Registry.
Shared DLLs: Checks information about Dynamic Link Libraries shared by multiple applications.
Application paths: Checks application path names from the Registry against current disk and directory structures.
Help Files Information: Checks to see that help files reside where listed in the Registry.
Windows Startup Items: Checks entries in the Run and Runonce keys, located in the Registry, invoked at Windows startup.
File/Path Residence: Looks for missing or non-existent files and folders in the Registry, by checking all filename and path references against disk structures.
By default, all the foregoing items except the last one are checked. For this Recipe, please leave it that way. Recovering from references deleted by cleaning up the last item can cause strange and painful system behaviors.
This process can take as long as five minutes to complete. When it's finished, a window like the one shown below pops up to report the results:
Step 6: When the Registry scan is complete, the program automatically updates the report page that appears as soon as the scan begins. On that display, the middle area of the screen shows an entry for each of the Registry content items listed earlier in this story. If a red circled X appears to the left of any such entry, you can click the View Details link to see what the program has discovered. As shown below, each Registry item is listed in detail, along with a brief description of the problem. In this particular case, the Class ID (CLSID) referenced in the entry does not match up to an existing class defined elsewhere in the Registry. These kinds of entries are normally completely safe to delete:
This screen shot tells another interesting story: Only the top two items in the list appear in bold, which means you can tell the program to fix them for you. Those not in bold still need fixing, but only the bold items can be clicked and fixed using this crippleware software. To fix everything that's listed, you must register and pay a fee to obtain a key that unlocks the software's full functionality.
Step 7: If you would like to exercise the software's repair capability (albeit on a small number of items), click the Close button on the details window, then click Fix Selected Problems on the primary Scan & Clean page that's revealed when you close the details window. Next, you can elect to view ordering information for the software, or continue with your trial use by clicking the appropriate button on the resulting pop-up window that appears. Click Continue Trial to keep going.
If you want to check your (limited) repairs, you can scan again. At this point you will see that the first two items from the previous details list will no longer be present. Instead, let's just finish this exercise. Leave the program by clicking the Finish button. Then click the red X in the upper right-hand corner of the primary window. This will exit CleanMyPC Registry Cleaner altogether. But in real life, the best practice is to scan again after making repairs. This will help you ensure that all items you told the software to fix have in fact been taken care of.
Before telling any program to fix -- that is, to delete -- a Registry entry, you should check any Registry items about which you're unsure or don't know. Do this by using a search engine to look up the final parts of the entry's key, name, or value. For example, I used Google to learn that entries from various caches and lists that include MRU (Most Recently Used) in their names are generally safe to delete. In fact, the worst thing that results is that programs or menus lose their memories of recently selected items.
Step 8: Uninstall the CleanMyPC Registry Cleaner. There are two ways to do this: Start, All Programs, CleanMyPC - Registry Cleaner, Uninstall CleanMyPC - Registry Cleaner. Or you can try Start, Control Panel, Add or Remove Programs, then select CleanMyPC - Registry Cleaner in the list of installed software, then click the Change/Remove button to get it off the system. Confirm de-installation by clicking Yes on the pop-up query, and be prepared to be asked to restart your system to complete that process. So close all open applications and so forth before proceeding.
In principle, that's all there is to it. In practice, the process takes at least half an hour, sometimes significantly longer, for each PC. The time needed will depend in large part on how well you know which Registry entries can be deleted and which must stay. More time is also lost when you need to research categories for any items that appear in your clean-up software's report.
Once you've finished cleaning a system's Registry, you may want to create another restore point or Registry backup. If you do, you'll be able to return to a clean version in the future, should you wish. Either way, from this point forward, plan to repeat this exercise at least twice a year for each PC. Also count on learning a lot more about the Registry as you encounter things you've yet to see!
Finally, I urge you to check comparative reviews, ratings, and rankings of Registry Clean-up Tools before you invest hard-earned dollars on these products. Shop for the best deal. For example, I found a far more comprehensive do-it-all PC program (V-Com's Fix-It Utilites 5) that includes top-ranked Registry clean-up capabilities, as well as disk degragmentation tools, a Windows Explorer replacement, anti-virus software, emergency recovery utilities, and a whole bunch more -- all for the same price as the example program I used in this TechBuilder Recipe. (Though a free crippleware version of Fix-It is not available.) Choose carefully to get the best value and greatest functionality for your tool-kit dollar.
Sidebar: REGISTRY RESOURCES
While there's an unbelievable wealth of information about the Windows Registry available, the Registry remains something of a mystery to many system builders. So here are some illuminating, even enlightening, sources for additional information.
I.) Microsoft Resources
Resource Kits: All Windows versions include a Resource Kit, which, in turn, includes a Technical Reference CD. On this CD, you'll find an invaluable Windows help file named regentry.chm that's updated regularly. If you have a hardcopy Resource Kit from Microsoft Press, or if you have access to soft-copy versions through an MSDN or TechNet subscription, you'll find it easy to lay hands on this treasure.
Safekeeping the Windows XP Registry: This article by Jerry Honeycutt explains various methods for backing up and restoring Registry contents safely and efficiently.
Product Documentation: Windows XP Home Edition's product documentation includes a nice Registry overview and points to key related activities. You can find it at this Windows Registry page.
Windows XP Registry Guide (Microsoft Press, 2003), a book by Jerry Honeycutt, features some of the best documentation, discussion, and information about the Registry available anywhere. It's a true gem.
II.) Other Resources
ComputerWorld's Windows Registry Resources are somewhat dated, but still worth checking out.
5 Star support maintains a nice (but short) online list of Windows Registry Resources.
III.) Product Reviews
Top Ten Reviews' Registry Repair Software page compares and contrasts 10 leading Registry-repair packages. And it's reasonably up-to-date.
PC World magazine offers a slew of news, articles and reviews under the general heading of System Resources Tune-Up. Included are several reviews of Registry repair and clean-up utilities. Worth a visit.
Ed Tittel is a writer and trainer in Austin, TX, who specializes in Windows and security topics. His latest book is The PC Magazine Guide to Fighting Spyware, Adware, and Malware.
About the Author
You May Also Like