Author: Ravi
•4:58 AM

What's the Registry, Should I Clean It, and What's the Point?


There's nothing more mysterious on a Windows PC than the Registry, and today I'll explain exactly what it is, how it works, and whether you should bother cleaning it. We'll also go about debunking a few widespread registry myths along the way.
As I said, the registry has always been a mysterious—if not entirely misunderstood—component of the Windows operating system. Today I've set out to explain in detail what the registry is all about. If you already have a working understanding of the registry, skip down to the mythbusting section for a little clarity regarding the usefulness of the many registry cleaners out there.

What Is the Registry?


The Windows Registry is a hierarchical database that stores settings for virtually everything on a Windows PC—from application settings, user passwords, device driver info, Windows settings, and pretty much everything else.
Application settings used to be stored in text-based configuration files (and with some applications, still are), with a separate file for every application. The Windows Registry is meant to solve that problem by providing a single place for all settings across all applications.
In addition to consolidating system settings, storing all of these settings in a single place and in a database format means that accessing values in the registry is much faster than parsing a text configuration file—so the registry can be used for more than just settings. In fact, most or all of the registry is read into memory each time the system boots, so accessing the registry is nearly instant.

Editing the Registry


There are a number of methods for editing the registry, but most of the time you'll just use the regedit.exe utility to make changes, which you can launch from the start menu search or run boxes. (Hit Win+R, paste regedit.exe, then hit Enter and you're there.) Once you've opened up the editor, you'll be presented with a tree view of keys on the left-hand side, and the values on the right. The most important thing you'll want to do when editing the registry is to export the entire key before you make any changes—don't ever assume that you can just change the value back.
You can use regedit to connect to another PC and edit the registry there, provided you have the proper network access and the remote registry service is running. You can also edit from the command line using the reg.exe utility, which can be very helpful if you need to make a registry change from a machine that won't boot anymore—if you can make it to the recovery console, you can manually make the registry change from the command line.

What Are These .reg Files?


If you spend any amount of time browsing Windows-tweaking web sites, you've undoubtedly come across a downloadable .reg file that somebody provides as a way to quickly add a setting to the registry. These files are nothing more than simple text files that contain instructions for the regedit utility to add, change, or remove keys in the registry without any accidental typos that cause your system to crash.
My recommendation is that before you apply any of these files, you first open them up in a text editor to see what they really contain, but in general, applying a .reg file is a lot safer and easier than manually making registry edits, provided you trust the source.

How Is the Registry Stored, and How Do I Back it Up?


Even though the registry is supposed to be one consolidated place to store everything on your system, it's not stored in a single file—all of the system hives other than HKEY_CURRENT_USER are stored under %SystemRoot%\System32\Config, and the rest are stored in the %SystemRoot%\Profiles\Username folder, and there are a lot of files to deal with.
Your best bet for backing up your registry is simply creating a System Restore point , but most of the popular backup software packages should be able to backup and restore the registry.
If you only need to backup a portion of the registry, you can open up regedit, find the key in the left-hand panel that you'd like to backup, and use the Export feature from the right-click menu to save the entire section to a text file format. You probably won't want to use this to backup the entire registry, but it can be useful if you want to keep a copy of HKEY_CURRENT_USER around in case you need to restore some settings—and you're ready to do some seriously geeky registry hacking. For the average user, System Restore is not just the preferred option, but it's also the one that Microsoft recommends.

Do You Really Need to Clean the Registry?


The internets are chock full of advertisements and testimonials for registry cleaning products that claim to fix every problem on your PC by giving your registry a good scrubbing; readers may even remember an unofficial Microsoft-supplied utility called regclean from years back, which gives even more validity to the idea that registry cleaning is a very useful pursuit. But do they really work?
The sad answer,  is that most of these products are not worth running, and while the better ones won't necessarily kill your PC, they're rarely going to help you a lot either. If you stop and think about it, you'll realize that since the registry contains many hundreds of thousands of keys (or more), removing 50 or even 100 of them isn't going to yield any performance gains.
Windows expert Ed Bott has some stronger words on the subject:
I'd go a step further: Don't run registry cleaner programs, period. I won't go so far as to call them snake oil, but what possible performance benefits can you get from "cleaning up" unneeded registry entries and eliminating a few stray DLL files?
That said, there are a few edge cases where cleaning the registry might yield some performance gains, if you've installed something that plugs into Windows somehow, doesn't work very well, and also doesn't uninstall itself properly. Most of these problems can be prevented in the first place by simply being more careful about what you install on your PC—after all, you shouldn't have to reinstall Windows regularly.
What About Defragging the Registry?
Another claim you'll often read about the registry is that you need to defrag it regularly to keep your PC from being extremely slow—in fact, Microsoft provides the PageDefrag utility for Windows XP to defragment your pagefile and registry. Windows 7 or Vista users will have to turn to a freeware utility like Auslogics Registry Defrag to keep their registry defragmented.
What most people don't realize, however, is that your registry is fully loaded into RAM when your system boots, meaning all reads and writes to the registry are done directly to memory, and then loaded to the disk later. So while you're going to gain some slight performance gain by making sure your registry isn't too fragmented, the reality is that your system isn't going to suddenly be blazing fast because you defragged your registry.
This entry was posted on 4:58 AM and is filed under . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

0 comments: