[HOME] 

Editing the Windows Registry

 
TOPIC

Information and warnings about editing the system registry.

 
DISCUSSION

The Windows registry is a database used by the operating system and by software applications to store configuration and state information. The following sections contain information about editing the registry directly, without the usual protective layers provided by user interfaces and warning messages.

You should always be very careful not to modify parts of the registry other than those expressly mentioned. Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. It cannot be guaranteed that problems resulting from the incorrect use of Registry Editor can be solved. You edit the registry at your own risk. You should consider backing up the registry before you edit it. If you are running Windows NT, Windows 2000, Windows XP or Windows Server 2003, you should also consider updating your Emergency Repair Disk (ERD) and/or creating a System Restore Point.

If you do not know how to access or edit the registry, please consult the Windows documentation and Help topics. For information about how to edit the registry, you can view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.

To open Registry Editor select Run... from the Windows Start menu and enter "regedit". On versions of Windows older than Windows XP and Windows Server 2003 you have to use "regedt32" instead of "regedit" if you need to view or edit access permissions. The functionality of these two formerly separate programs is now part of Regedit.

Once you are in the Registry Editor you will see a tree of folders. These are like directories on a filing system, only that in the registry they are called "keys". Keys can contain more keys (subkeys), as well as values (which are somewhat similar to files in a filing system). Values contain the actual information, e.g. strings, or numbers, in different formats. Each value can be of only one specific type.

Like directories, key names are often combined to form a path when they appear in documentation or support information. For example, "HKEY_LOCAL_MACHINE\SOFTWARE\Cloanto" refers to the "Cloanto" key inside "SOFTWARE, which in turn is inside "HKEY_LOCAL_MACHINE".

You can save an entire key and its content by clicking the key and choosing Export Registry File... from the Registry menu. Once you have saved such a ".reg" file you can right-click it and select Open With... Notepad to view its content. Don't double-click registry files which you are not sure about, as the default action for these files is to load them into the registry, rather than to show them to you.

Each key also has a default value, which is a special type of value which does not have a name (or better, its name is a null string, ""). Because the default value does not have a name, it is referred to in different ways, which can be confusing if you don't know about them:

  • Inside Registry Editor the default value appears as "(default)"
  • When exported to a registry (.reg) file, the default value is referred to as "@"
  • When key names are combined to form a path, a trailing backslash character ("\") is used to refer to the default value

In either case, the default value is not named "(default)" or "@", or "\", it is simply the default value of the key which contains it, and has an empty name.