Each branch of the registry contains information that logically belongs together. Each root key reflects a different aspect of the configuration data (that is, the user data and machine-dependent settings). Each of the root key names begins with "HKEY_", which stands for Key Handle.
The registry contains keys with values that can change depending on the user and the system. It would be impossible to describe all registry settings, but what follows is a general description of the registry root keys and some of the more significant subkeys.
This branch of the registry is stored in the System.dat file. This key contains all data used for backward compatibility with Windows 3.x OLE and Dynamic Data Exchange (DDE) support. It also contains all the names of registered file types and their properties (icons and commands), and information about Quick Viewers, property sheet handlers, copy hook handlers, and other ActiveX components. An application’s setup program registers the file extension of the file type and the commands that are applied to this file type in subkeys of HKEY_CLASSES_ROOT.
HKEY_CLASSES_ROOT is a pointer to HKEY_LOCAL_MACHINE\Software\Classes subkey, meaning that HKEY_CLASSES_ROOT points to all the subkeys in HKEY_LOCAL_MACHINE\Software\Classes.
The Classes key contains two types of keys:
Note
It is sometimes necessary to put quotation marks around the %1, such as "%1", for long file names. This is needed for some programs to work with long file names. For example, with Registry Editor, if quotes are not placed around the file name, you cannot open a REG file that contains a space in the name, such as Name With A Space.reg.
The file name extension keys pertain to the file extensions. For each of those keys, a second file type (batfile, exefile, and so on) exists. Most of these keys are identified by a leading period, followed usually by three characters of a file name extension, such as .bmp. Windows 98 begins a search for any file type by looking in this registry key for a key name that matches the file extension.
The CLSID (Class Identifier) key contains ActiveX object properties. This 16-byte value corresponds to a specific ActiveX module. The default value of the key is usually a description of the ActiveX class, such as General Property Page Object and identifies the object associated with that CLSID number.
The asterisk (*)key signifies a file extension wild card. The information found here applies to all files regardless of their extensions. You can specify shell extensions, such as context menu items, that apply to all applications with this key.
This key also contains a type of action that can be performed on an object, such as print, open, or edit. This is called a verb in the registry. For example, the Shell key of HKEY_CLASSES_ROOT contains keys that define the actions edit, open, or print, all of which can be performed on a BAT file type. If you right-click a BAT file in Windows Explorer, you find the commands Edit, Open, and Print on the context menu. Also, double-clicking a BAT file in Windows Explorer invokes the open verb.
HKEY_CURRENT_USER contains the configuration information of the user profile for the currently logged on user. A user profile ensures that the user interface and operation of Windows 98 will be the same on any computer where that user logs on, if that person’s profile is available at that computer.
HKEY_USERS contains the profile configuration information for a default user and the user defined with a user profile that is currently logged on. HKEY_CURRENT_USER points to either the default user or the user that is currently logged on.
HKEY_CURRENT_USER contains all the information necessary to set up a particular user environment on the computer, such as application preferences, screen colors, and security access permissions. Many of these settings are the same kind of information that was stored in Win.ini under Windows 3.x. HKEY_CURRENT_USER has several subkeys, some of which are described in the Table 31.11.
Table 31.11 HKEY_CURRENT_USER subkeys
Subkey | Contents |
---|---|
AppEvents | Contains subkeys holding the path and file name of the system sound files that play when specific system events occur. The EventLabels subkey contains the labels for sounds. The Schemes subkey contains the wave file for the sounds. |
Control Panel | Contains subkeys for Control Panel settings, including information stored in Win.ini and Control.ini under Windows 3.x. |
InstallLocationsMRU | Contains the locations that applications were most recently installed from (MRU stands for "most recently used"). |
Keyboard layout | Contains subkeys that contain values defining the current active keyboard layout, which should be set by using the Keyboard option in Control Panel. |
Network | Contains subkeys describing persistent and recent network connections. |
RemoteAccess | Contains address and profile subkeys for remote network access. |
Software | Contains subkeys describing the current user’s software settings and containing application-specific information stored in Win.ini or private initialization files under Windows 3.x. |
HKEY_LOCAL_MACHINE contains the configuration data for the local computer. The information in this database is used by applications, device drivers, and Windows 98 to determine configuration data for the local computer, regardless of which user is logged on and what software is in use. The configuration data in this key is stored in the System.dat file.
Hardware devices can place information in the registry automatically using the Plug and Play interface. Software for installing device drivers can place information in the registry by writing to standard APIs. Users can place information about hardware in the registry by using the Add New Hardware option in Control Panel, or by using Device Manager, as described in Chapter 24, "Device Management."
HKEY_LOCAL_MACHINE contains several subkeys, as listed briefly in Table 31.12. The rest of this section provides details about some of these keys.
Table 31.12 HKEY_LOCAL_MACHINE subkeys
Subkey | Contents |
---|---|
Config | A subkey of Config is mapped to HKEY_CURRENT_CONFIG as the current configuration. A collection of hardware configuration profiles for the local computer. The profiles are found on the Hardware Profiles tab in the System option from the Control Panel. |
Enum | Contains information about hardware devices connected to the system. |
Hardware | Contains information about serial ports and modems used with the HyperTerminal program. |
Network | Network information created when a user logs on to a networked computer, including the user name, primary network provider, whether the logon was validated by a server, and information about the system policies processor. |
Security | Contains information about the network security access, provider, and remote administration capabilities. |
Software | The computer-specific information about software installed on the local computer, along with miscellaneous configuration data. |
System | The database that controls system startup, device driver loading, Windows 98 services, and operating system behavior. |
A subkey of Config is mapped to HKEY_CURRENT_CONFIG as the current configuration. HKEY_LOCAL_MACHINE\Config contains information about alternate hardware configurations for the computer. For example, it can contain information about multiple configurations to be used when the computer is connected to a network, when it is undocked from a docking station, and so on. Each alternate configuration is assigned a unique identifier, and this configuration ID has a subkey under the Config key. Each configuration appears in the list of hardware profiles in the System option in Control Panel.
When Windows 98 checks the hardware configuration at system startup, one of three things occurs:
Windows 98 bus enumerators are responsible for building the hardware tree. This includes assigning an identification code to each device on its bus and retrieving the device’s configuration information, either directly from the device or from the registry. For more information about the hardware tree and bus enumerators, see Chapter 28, "Windows 98 Architecture."
Bus enumeration information is stored in the HKEY_LOCAL_MACHINE \Enum subtree. For all types of devices, subkeys contain information, such as device type, assigned drive letter, hardware ID, and device manufacturer, plus driver-related information for network components.
Information about the following types of devices is stored in these subkeys (this is not an inclusive list):
Subkey | Device enumeration |
---|---|
ESDI | Fixed disk devices |
FLOP | Floppy disk devices |
ISAPNP | Plug and Play devices on an ISA bus |
Monitor | Monitor devices |
Network | Network protocol, server, and bindings |
Root | Legacy devices |
The HKEY_LOCAL_MACHINE\Software subtree contains configuration information about all installed software that has written its configuration information in the registry. The entries in this key apply for anyone using this particular computer, and include definitions for file associations and OLE information.
The Software subkey contains, for example, the information you add when registering an application to use a specific file name extension and information added during installation of Windows-based applications.
The HKEY_LOCAL_MACHINE\Software subtree contains several subkeys, including the Classes subkey, plus Description subkeys for all installed software that has registered itself in the registry, as described in the following sections.
Classes subkey.
The HKEY_LOCAL_MACHINE\Software\Classes subkey defines types of documents and provides information about OLE and file name extension associations that can be used by applications. HKEY_CLASSES_ROOT is an alias for this subkey.
HKEY_CLASSES_ROOT is a pointer to HKEY_LOCAL_MACHINE\Software\Classes. The sole purpose for HKEY_CLASSES_ROOT is to provide compatibility with the Windows 3.x registration database.
Description subkeys
The various subkeys of HKEY_LOCAL_MACHINE\ Software\Description contain the names and version numbers of the software installed on the local computer (if that software writes information to the registry as part of its installation process). User-specific information about the configuration of an application is stored at the same relative path under HKEY_CURRENT_USER.
Important
The information in each subkey is added by the related application. Do not edit entries in these subkeys unless directed to do so by your application vendor.
During installation, applications record this information in the following form:
HKEY_LOCAL_MACHINE\Software\CompanyName\ProductName\Version
The key named HKEY_LOCAL_MACHINE\Software\Microsoft and its subkey named Windows\CurrentVersion are of particular interest. These subkeys contain information about software that supports services built into Windows 98.
The Setup subkey under HKEY_LOCAL_MACHINE\Software\Microsoft \Windows\CurrentVersion is used internally by Windows 98 for its Setup program.
The data in HKEY_LOCAL_MACHINE\System is organized into control sets that contain a complete set of parameters for device drivers and services that can be loaded with Windows 98.
All data that controls startup is described in the CurrentControlSet subtree under HKEY_LOCAL_MACHINE\System. This control set has two parts:
Control subkey.
The Control subkey contains startup parameters for the system, including settings for startup and shutdown, file system performance, keyboard layouts and language support, and so on. Table 31.13 describes some typical Control subkeys.
Table 31.13 Typical Control subkeys
Subkey | Contents | ||||
---|---|---|---|---|---|
ComputerName | The computer name, which should be set using the Network option in Control Panel. | ||||
FileSystem | The type and settings of the file system. | ||||
IDConfigDB | The identification for the current configuration. | ||||
Keyboard layouts | A list of the DLLs for the keyboard language, which should be set using the Keyboard option in Control Panel. | ||||
Resources | Descriptions and driver information for multimedia components. | ||||
NetworkProvider | Descriptions of the network providers. | ||||
Nls | Contains information on national language support, including language and locale preferences, which should be set using the Keyboard option in Control Panel. | ||||
PerfStats | Statistics gathered from system components that can be viewed using System Monitor. | ||||
Contains information about the current printers and printing environment, contained in several subkeys: Environments, which can contain subkeys defining drivers and print processors for operating system environments. Monitors, which can contain subkeys with data for specific network printing monitors. Printers, which can contain subkeys describing printer parameters for each installed printer. Providers, which can contain subkeys describing DLLs for network print services. |
|||||
SessionManager | Global variables that are maintained by the operating system, plus subkeys that list applications that do not run well under Windows 98, DLLs whose version numbers should be checked, and directories and file names for all the Session Manager DLLs. | ||||
TimeZoneInformation | Values for time zone settings, which should be set using the Date/Time option in Control Panel. | ||||
Update | Value indicating whether Windows 98 was installed over an earlier version of Windows. | ||||
VMM32 | The file names of VxD files combined into the Vmm32.vxd virtual device driver. |
Services subkey for CurrentControlSet.
The Services subkey in CurrentControlSet lists the Kernel device drivers, file system drivers, and Windows 98 service drivers that can be loaded at startup. The Services subkey also contains subkeys with static descriptions of hardware to which drivers can be attached. Table 31.14 shows some typical Services subkeys.
Table 31.14 Typical Services subkeys
Subkey | Contents | ||||
---|---|---|---|---|---|
Agent_name | Subkeys for each installed system agent, such as Microsoft Network Monitor, SNMP, or network backup agents. | ||||
Arbitrators | Subkeys for arbitrators required to manage resources between competing devices, usually including address, DMA, I/O, and IRQ arbitrators. | ||||
Class | Subkeys for all classes of devices the operating system supports, such as disk drives, keyboard, display, mouse, and so on. | ||||
MSNP32, NWNP32 | Subkeys for 32-bit, protected-mode network providers, including logon and security provider information. | ||||
VxD | Subkeys for all virtual device drivers, including disk drivers, network components, disk caches, and so on. |
Caution
Do not change these value entries using Registry Editor. These settings should be maintained only by the system. Settings for drivers that appear under the Services subkeys can be changed by using Control Panel or system policies.
HKEY_USERS contains all current user information (the Default subkey), plus all previously loaded user profiles for users who have logged on in the past. The information in the Default subkey is used to create the user profile for a user who logs on without a user profile. The Default subkey contains keys for AppEvents, Control Panel, Keyboard layouts, Network, RunMRU, and Software, among others.
If the HKEY_USERS key shows a Default subkey only, then HKEY_ CURRENT_USER points to that key in HKEY_USERS. If a second key with a user name exists, then HKEY_CURRENT_USER points to that second key.
Whenever similar data exists in HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER, the data in HKEY_CURRENT_USER takes precedence. For example, settings for applications and the desktop defined by the current user take precedence over default settings.
This subkey includes the same subkeys as HKEY_CURRENT_USER.
This branch of the registry is stored in the System.dat file. The HKEY_ CURRENT_CONFIG key points to the current system configuration in the collection of configurations stored in HKEY_LOCAL_MACHINE \Config\000x, which contains the current hardware configuration. The number x refers to the configuration number. For example, if you have a docked and an undocked mode for your portable computer, you would have a subkey for each configuration: 0001 and 0002.
The Display subkey specifies screen fonts and screen settings, such as resolution. The Enum subkey contains subkeys that specify Plug and Play BIOS and the System subkey contains subkeys that list available printers.
Some configuration information in Windows 98 must be stored in RAM because it requires fast modification and retrieval that cannot wait for the registry to flush to the hard disk. All this data can be found under HKEY_DYN_DATA. This information under this key is newly created every time Windows 98 starts.
The Config Manager subkey, sometimes referred to as the hardware tree, is a record in RAM of the current system configuration. The information is drawn from the devices currently installed and loaded, or that failed loading. The hardware tree is created every time the system starts and updates whenever a change occurs to the system configuration. The information that appears in Registry Editor is provided when this key is displayed, so it is never out of date.
HKEY_DYN_DATA also contains statistics gathered for various network components currently in use on the system. These reside under HKEY_DYN_ DATA\PerfStats.
VxDs from other vendors can provide dynamic data to this area too. For more information, see the Win32 Software Development Kit for Windows 98 and Windows NT.