Skip the navigation

The tweaker's guide to the Windows Registry

Want to hack Windows? Better get familiar with the Registry first. Here's what you need to know.

October 18, 2007 12:00 PM ET

Computerworld - If you plan on tweaking any version of Windows, you're going to have to get friendly with the Windows Registry, a database of information that defines how your PC works, including every part of Windows and its applications and interface. Editing the Registry is often the best way to tweak Windows. In fact, it's the only way to make certain changes.

Even if you've never edited the Registry directly before, you've changed it without realizing it. Whenever you change just about any setting in Windows via a menu or some other method, a Registry change is made behind the scenes, putting that new setting into effect. The menus and dialog boxes you see in Windows are often little more than a visual front end to the Registry.

But knowing how to find your way around the Registry gives you access to many more controls than Windows' menus and dialog boxes provide. To edit the Registry directly, use Windows' built-in Registry Editor, shown below.

The Registry Editor

The Registry Editor. (Click for larger view.)

At first glance, the Registry is a maze of apparently incomprehensible settings, overwhelming in their complexity. In fact, though, there's some method to the madness. In this article, I'll explain how the Registry works, give you an overview of its organization and offer detailed instructions on how to edit it.

Editor's note: We're assuming that any Registry edits you make will be on your own computer. Always check with your IT department before altering a company-owned machine.


Careful!

Editing the Windows Registry is easy -- perhaps too easy. There is no Save button in the Registry. When you modify a value, it changes right then and there. There is also no Undo button. Once you make the change, it's done. If you're not careful, you could do serious harm to your computer setup, your applications and the way Windows works.

So before you touch the Registry, use System Restore to create a restore point so that you can revert to the previous version of the Registry if something goes awry. It's also a good idea, once you begin editing the Registry, to write down the current state of any key or value you plan to edit before you make any changes.

Creating a restore point
To create a restore point in Windows Vista, choose Control Panel --> System and Maintenance --> Restore files from backup --> Create a restore point or change settings.

In XP, choose Start --> Help and Support --> Performance and Maintenance --> Using System Restore to undo changes --> Run the System Restore Wizard --> Create a restore point and answer the wizard's questions.

Reverting to a restore point
To revert to a system restore point in Vista, select Control Panel --> System and Maintenance --> Restore files from backup --> Repair Windows Using System Restore and follow the directions for reverting to a restore point.

In XP, follow the same steps you would to create a restore point (above). When you get to the System Restore Wizard, choose Restore my computer to an earlier time and answer the wizard's questions.




Finding your way around the Registry

Before we begin editing the Registry Editor, we'll take a look at the overall structure of the Registry and its various components. The first thing you need to know is that the Registry has many thousands of settings, organized into five main sections, called Registry hives. Each hive has a different purpose.

Following are the five hives and what each does:

HKEY_CLASSES_ROOT: This hive tells Windows how to handle every file type and controls basic user interface options.

HKEY_CURRENT_USER: This hive contains configuration information about the system setup of the user that is currently logged into Windows. It controls the desktop, as well as Windows' appearance and behavior. It also manages connections to networks and devices such as printers; personal preferences such as screen colors; and the user's security rights.

HKEY_LOCAL_MACHINE: This hive contains information about the computer itself -- details about the hardware, including keyboard, printer ports, storage ... in fact, the entire hardware setup. In addition, it has information about global security, installed software, system start-up and drivers.

HKEY_USERS: This hive contains information about every user profile on the system.

HKEY_CURRENT_CONFIG: This hive contains information about the current hardware configuration of the system, in the same way HKEY_CURRENT_USER contains information about the current user of the system.



Our Commenting Policies