Windows registry explained simply

I can’t say I’ve ever seen the Windows registry explained well. It helps to think of the registry as a database. Microsoft loves databases, and they’ve been trying for decades to stuff as much database technology into Windows as they can. The registry was one of the earliest and most successful of those efforts.

Although it was controversial in the 1990s, the registry solved a very real problem. Windows 3.1 and earlier stored all of its settings in huge plaintext files called ini files. They were a tangled mess, and the more you used your computer, the slower it became. The registry made it a lot faster for the computer to find each setting it needed.

The downside is that every program on your computer can dump whatever it wants into the registry. And since it’s a database, the risk of corruption and empty space always lingers. But the doomsday scenario a lot of critics, myself included, predicted in 1995 didn’t happen. Yes, registry problems exist. But it’s not epidemic.

Structure

The registry is structured a lot like a hard drive, but instead of files and folders, it uses a hierarchy of hives and keys. A key is an individual setting. Hives consist of any number of keys and other hives.

If you’re familiar with navigating a hard drive, you can get familiar with navigating the registry the same way.

Windows has five hives at the root: HKEY_CLASSES_ROOT, HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER, HKEY_USERS, and HKEY_CURRENT_CONFIG. Usually if you make changes, it will be somewhere inside HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER.

These five root hives are frequently abbreviated by HK followed by their initials, such as HKLM for HKEY_LOCAL_MACHINE and HKCU for HKEY_CURRENT_USER.

Editing the registry

Windows registry explained - Regedit
In this screenshot of Regedit, you can see the five main hives to the left. You can view and edit individual keys on the right.

To edit the registry, click the Start menu, type regedit, and press enter. Windows will probably ask if you want to allow the program to make changes to your computer. Click yes. By definition, the registry editor makes changes to your computer.

Once you have the registry editor open, you can see hives on the left and keys on the right. Scroll through the list to get where you need to be. To open a hive, double-click on it. To edit a key, double-click on it. If you need to create a new key, right-click, select a data type, and name it.

When creating new keys, it’s best to follow someone else’s directions. Creating random registry keys won’t serve any useful purpose.

Importing and exporting registry settings

You can export a registry key or an entire hive by right clicking on it and clicking Export. Never export a root hive like HKLM in its entirety; just export the portions of the registry you need.

Registry exports are plaintext files with a file extension of .REG. You can edit them in Notepad or another text editor if you wish.

To import a registry file, click File, then Import. Pick the .REG file from the dialog box and click Open. I have a couple of registry settings that improve Windows performance; I keep copies of them on my server so I can quickly import them whenever I build a computer.

Further reading

Registry cleaning is a controversial topic. There are some things you shouldn’t do, but two things that do help. If you ever need to toggle a registry setting between two values, here’s how.

Leave a Reply

%d bloggers like this:
WordPress Appliance - Powered by TurnKey Linux