Windows Basics

The Registry is a central database provided by the Windows operating system where system and software configuration details are stored. It's arranged into a hierarchical structure that is similar to the way folders and files are organized on a hard drive.

The Registry is organized into six main folders, called main keys. Each of these main keys can contain any number of sub-folders, called sub keys. Information in the Registry is stored inside the main keys and sub keys as values.

There are three different types of values that can be stored in the Registry: String, Binary, and DWORD. String values contain strings of characters, Binary values contain binary data, and each DWORD value contains a single 32-bit ("double word") value.

Each main key in the Registry contains a different kind of information.

The six main keys are:

HKEY_CLASSES_ROOT

HKEY_CLASSES_ROOT is used to store information on different aspects of shell integration, like file associations, OLE, DDE, and drag-and-drop operations.

This key is actually a link to HKEY_LOCAL_MACHINE\SOFTWARE\Classes. Storing information in HKEY_CLASSES_ROOT is the same as storing information in HKEY_LOCAL_MACHINE\SOFTWARE\Classes, and vice-versa.

HKEY_CURRENT_USER

Like HKEY_CLASSES_ROOT, this is actually a link to another key. In this case, it points to the key in HKEY_USERS that belongs to the user who is currently logged onto the system. This is where configuration information for the current user is stored.

HKEY_LOCAL_MACHINE

HKEY_LOCAL_MACHINE contains information about system hardware, peripherals, installed software, OLE and software configuration, and other Windows configuration details.

HKEY_USERS

This is where user-specific configuration information is stored. Individual sub keys hold settings for each user, and the default settings are kept in a sub key named .Default.

HKEY_CURRENT_CONFIG

HKEY_CURRENT_CONFIG stores information for plug-and-play devices and the various hardware configurations that have been defined.

HKEY_DYN_DATA

HKEY_DYN_DATA is used by Windows to store dynamic information that changes frequently during the normal operation of Windows. It's usually best to leave this key alone.

Tip: You can use the Registry actions to read from and write to the Registry.

Next: Command Line Arguments