The Registry is structured as a set of four subtrees of keys that contain per-computer and per-user databases. The per-computer information includes information about hardware and software installed on the specific computer. The per-user information includes the information in user profiles, such as desktop settings, individual preferences for certain software, and personal printer and network settings. In versions of Windows for MS-DOS, per-computer information was saved in the WIN.INI and SYSTEM.INI files, but it was not possible to save separate information for individual users.
In the Windows NT Registry, each individual key can contain data items called value entries and can also contain additional subkeys. In the Registry structure, keys are analogous to directories, and the value entries are analogous to files.
Figure 10.3 The Four Subtrees in the Windows NT Registry
The following table identifies and defines these four subtrees.
Table 10.1 Registry Subtrees
Root key name | Description |
HKEY_LOCAL_MACHINE | Contains information about the local computer system, including hardware and operating system data such as bus type, system memory, device drivers, and startup control data. |
HKEY_CLASSES_ROOT | Contains object linking and embedding (OLE) and file-class association data (equivalent to the Registry in Windows for MS-DOS). |
HKEY_CURRENT_USER | Contains the user profile for the user who is currently logged on, including environment variables, personal program groups, desktop settings, network connections, printers, and application preferences. |
HKEY_USERS | Contains all actively loaded user profiles, including HKEY_CURRENT_USER, which always refers to a child of HKEY_USERS, and the default profile. Users who are accessing a server remotely do not have profiles under this key on the server; their profiles are loaded into the Registry on their own computers. |
Each of these subtrees is described in detail later in this chapter. Each of the root key names begins with "HKEY_" to indicate to software developers that this is a handle that can be used by a program. A handle is a value used to uniquely identify a resource so that a program can access it.