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.

Page 2 of 4

Understanding keys and values

Underneath each hive are keys, which can in turn contain subkeys, and those subkeys can contain subkeys, and so on, organized in directory fashion, much like a hard drive.

Keys and subkeys contain one or more values, each of which controls a particular setting in Windows. Here are the six primary types of Registry values:

String value (REG_SZ): This kind of value is easy to understand and edit because it is made up of plain text and numbers. It is one of the most common types in the Registry, and the type you're likely to edit most frequently.

For example, this value

HKEY_CURRENT_USER\Control Panel\Mouse


determines the maximum number of milliseconds that can elapse between two mouse clicks for Windows to consider them a double-click (for the user currently logged into Windows).

Binary value (REG_BINARY): This value is made up of binary data: 0s and 1s. As a general rule, you won't edit binary values.

DWORD (32-bit) value (REG_DWORD): This value is represented as a number. Sometimes the value acts as a toggle -- 0 turns on the key and 1 turns off the key -- though other numbers may be used instead.

QWORD (64-bit) value (REG_QWORD): This is like a DWORD value, except that it can hold larger values.

Multistring value (REG_MULTI_SZ): This value contains several strings of plain text and numbers. The Registry Editor will let you edit these values, but it won't let you create them.

Expandable string value (REG_EXPAND_SZ): This value contains the location of files and tells Windows where to find them.


Editing the Registry


With all that as a background, you're ready to get down and dirty and start editing the Registry. Edit the Registry using the Registry Editor. To launch it, select Start --> Run (on XP) or Start --> Start Search (on Vista), type regedit and press Enter (you can also type regedit at the command prompt). In Vista, you'll have to click through a UAC prompt after you press Enter.

If this is the first time you've run the Registry Editor, it will open with the HKEY_CURRENT_USER hive highlighted, as shown below. If you've previously used the Registry Editor, it will highlight the last key you edited or the last place you were in the Registry.

Browse through the Registry with the Registry Editor in the same way you browse through a hard disk using Windows Explorer. Clicking a + sign (in XP) or a light triangle (in Vista) opens a key to reveal the next level down the hierarchy. Clicking a - sign (in XP) or a dark triangle (in Vista) closes the key.

Opening the Registry Editor for the first time
Using the Registry Editor for the first time (shown in Windows Vista).

You can also use shortcut keys to navigate. Pressing the right arrow key on your keyboard opens a Registry key to reveal subkeys; pressing the left arrow key closes a key and moves one level up in the key hierarchy. To jump to the next subkey that begins with a specific letter, press that letter on the keyboard.

If you're looking for a particular key, an even faster way to navigate is to use the Find command from the Edit menu. (You can also use the Find command by pressing Ctrl-F.) To find successive keys with the same value, press the F3 key.

You use the Registry Editor to edit existing keys and values, create new keys and values, or delete keys and values. Sometimes the changes take effect as soon as you make the change and exit the Registry Editor; other times, you'll have to log off and on or reboot for them to take effect.

| 1 2 3 4 Page 2
Computerworld's IT Salary Survey 2017 results
Shop Tech Products at Amazon