Windows 95/98

Windows Support Menu


Windows 9X Registry


The central information database for Windows 98 is called the registry. This hierarchical database both simplifies the operating system and makes it more adaptable. The registry simplifies the operating system by eliminating the need for Autoexec.bat, Config.sys, and INI files. However, Windows 98 still supports the use of these files when legacy applications require them. It makes the operating system more adaptable by storing user-specific and configuration (such as in-the-office and on-the-road configurations) for each computer.

A primary role of the registry in Windows 98 is to serve as a central repository for hardware-specific information for use by the hardware detection and Plug and Play system components. Windows 98 maintains information about hardware components and devices that have been identified through an enumeration or detection process, in the hierarchical structure of the registry.

When a new device is found, Windows 98 then searches all available media for the driver that best matches the device. Once the driver is found, it is added to the registry alongside the settings for the device.

Improvement over INI files

Earlier versions of Windows used initialization (INI) files to store system-specific or application-specific information on the state or configuration of the system. For example, the Win.ini file stored information about the appearance of the Windows environment, the System.ini file stored system-specific information on the hardware and device driver configuration of the system, and various INI files (such as Msmail.ini and Winword6.ini) stored application-specific information.

The registry alleviates the issues of dealing with multiple INI files by providing a single location for the computer's configuration information.

INI files are text-based, limited to 64 KB in total size The registry has no size restriction and can include both binary and text values
Information stored in INI files is nonhierarchical and supports only two levels of information. The registry is hierarchically arranged
Many INI files contain a myriad of switches and entries that are complicated to configure or are used only by operating system components. The registry contains more standardized values.
INI files provide no mechanism for storing user-specific information, thus making it difficult for multiple users to share a single computer or for users who move around on the network to have access to their user-specific settings. The HKEY_USERS key stores user-specific information.
Configuration information in INI files is local to each system, and no API mechanisms are available for remotely managing configuration, thus maiking it difficult to manage multiple computers. The registry can be remotely administered, and system policies (stored as registry values) can be downloaded from a central server each tile a new user logs on.

When you upgrade from Windows 3.1 to Windows 98, system-specific information, such as the references to the loading of static virtualization drivers (VxDs), is moved (as appropriate) from the System.ini file to the registry.

For backward compatibility, Windows 98 supports Autoexec.bat, Config.sys, and INI files, because many Win 16-based applications still use them. For example, Windows 98 allows Win16-based applications to use INI files for their program settings, parameters, device drivers, and so on that the applications need to run. In addition, Windows 98 continues to scan the [286Enh] section of System.ini at startup to check for virtualization drivers to ensure that they are loaded.

Network Access to Registry Information

One advantage of the registry for Win32-based applications is that many of the Win32-based registry APIs can be used remotely through the remote procedure call (RPC) mechanism in Windows 98 to provide access to the registry information across a network. This means that network administrators can use system management tools to access the contents of the registry for any computer on the network. (Of course, the remote computer must be configured to allow remote administration and must have user-level security.)

With Windows 98 remote administration, such industry management mechanisms as Simple Network Management Protocol (SNMP) can easily be integrated into Windows 98, lightening the network administrator's management and support burden.

Windows Management Infrastructure

The Windows management Infrastructure collects a wealth of information about the entire system as well as device configuration. This information is stored in the registry and made available through extensions to the registry API. This software is the foundation of Microsoft's support for Desktop management Interface (DMI) and will provide device and system information to OLE Management Services (OLE MS) and Simple Network Management Protocol (SNMP) in the future.
Caution: Making a mistake in editing the registry can cause your system to become unstable and/or unusable.

Whenever possible, use the administrative tools, such as Control Panel or System Policy Editor, to make configuration changes, rather than editing the registry. This is to insure values are stored properly in the registry when changing the configuration.

If you use Registry Editor to change values, you will not be warned if any entry is incorrect. Editing the registry directly by using Registry Editor can cause errors in loading hardware and software, and can prevent users from being able to start the computer.

Dell Computer Corporation does not support editing the registry. Do not edit the registry without consulting a Technical Support Mentor and without taking into account the level of experience of the end user (customer).

Overview of the Windows 98 Registry

The structure of the Windows 98 registry has not changed significantly from the Windows 95 registry. What has changed is that code that handles the registry has become faster and more robust, and the registry now detects when certain problems arise, and automatically fixes them.

The registry is the central storage for all configuration data. The Windows 98 system configuration, the computer hardware configuration, configuration information about Win32-based applications, and user preferences are all stored in the registry. For example, any Windows 98 computer hardware configuration changes that are made with a Plug and Play device are immediately reflected in a configuration change in the registry. Because of these characteristics, the registry serves as the foundation for the user, system, and network management in Windows 98.

The registry stores the data in a hierarchical form. Because the registry contains all settings required to configure memory, hardware peripherals, and Windows 98 - supplied network components, you will find that it is no longer necessary to configure settings in startup and configuration and initialization files. Also, because all settings are stored in a central location, you can provide both local and remote support for system configuration using Windows 98 tools.

To properly manage resources, such as Interrupt requests (IRQs), I/O addresses, and direst memory access (DMAs), Windows 98 uses the registry to track devices and resources allocated for both Plug and Play-compliant devices, ACPI mechanisms, and legacy devices. The registry provides a centralized, dynamic data store for all Windows settings, with a "current configuration" branch that stores information on a per-configuration basis. For example, the Display option in Control Panel stores per-configuration information about display resolution changes and the Print option in Control Panel stores per-configuration information about the default printer.

Device Manager - which is accessed from the System option in Control Panel - provides a graphical representation of devices configured in Windows 98, and allows properties used by these devices to be viewed and changed, as appropriate. Device Manager also shows resources allocated for the configured devices. Through the resource configuration information maintained in the registry, Windows 98 is able to automatically identify and resolve device resource conflicts for Plug and Play - compliant devices. For legacy devices, Device Manager helps users quickly identify and resolve resource conflicts with devices in the system.

The registry is roughly analogous to the INI files used under Windows 3.x, with each key in the registry similar to a bracketed heading in an INI file and with registry values similar to entries under the INI headings. However, registry keys can contain subkeys, while INI files do not support nested headings. Registry values can also consist of binary data, rather that the simple strings used in INI files.

Although Microsoft discourages using INI files in favor of registry entries, some applications (particularly 16-bit, Windows-based applications) still use INI files. Windows 98 supports INI files solely for compatibility with those applications and related tools (such as setup programs). The Autoexec.bat and Config.sys also still exist for compatibility with real-mode system components and to allow users to change certain default system settings, such as the PATH environment variable. New Win32-based applications can store their initialization information in the registry.

The Windows 98 registry provides the following benefits:

  • Registry services use less real-mode memory and less protected-mode memory. This translates to faster startup times and an overall increase in system performance.
  • Registry services have much better caching support. This dramatically improves the time used to look up values in the registry. This also translates to an overall increase in system performance.
  • Windows 98 automatically detects many sources of corruption. For example, if a computer does not shut down completely due to power failure, Windows 98 detects the improper shutdown and automatically runs Registry Checker to find and fix any registry errors that may have occurred due to improper shutdown.
  • Registry Checker is a system maintenance program that finds and fixes registry problems. Each time you start your computer, Registry Checker automatically scans the registry for inconsistent structures, and if no problem is found, Registry Checker backs up the registry once per day. If a problem is found in the registry, Registry Checker can restore the registry from a good backup copy. Registry Checker maintains five compressed backups of the registry that have successfully started the computer. Registry Checker attempts to fix the registry if a backup cannot be found. Registry Checker also removes unused space in the registry, reducing the size of the registry file, and therefore improving performance.
  • As with Windows 95, a single source provides data for enumerating and configuring the hardware, applications, device drivers, and operating system control parameters. The configuration information can be recovered easily in the event of system failure.
  • As with Windows 95, users and administrators can configure computer options by using standard Control Panel tools and administrative tools, reducing the likelihood of syntactic errors in configuration information.
  • A set of network-independent functions can be used to set and query configuration information, allowing system administrators to examine configuration data on remote networked computers.
  • The registry key size limit of approximately 64 KB that existed in Windows 95 has been removed in Windows 98. This allows you to install more applications with shared dynamic link libraries (DLLs) in your computer.

Because user-specific registry information can be maintained on a central network server when user profiles are enabled, users can have access to personal desktop and network access preferences when logging on to any computer, and settings for multiple users can be maintained on a single computer. Also, system policies can be used to enforce certain registry settings for individuals, workgroups, or all users.

Overview of the Registry Files

Although the registry is logically one data store, physically it consists of three different files to allow maximum network configuration flexibility. Windows 98 uses the registry to store information in three major categories.

User.dat User-specific information, in the form of user profiles, is contained in the User.dat file. It contains logon names, desktop settings, Start menu settings, and so forth. During Windows Setup, User.dat is automatically stored as a hidden file in the \Windows directory, but the file does not necessarily remain there. If User Profiles are enabled, users can have their own settings stored in \Windows\Profiles. In a network, this file may be located on a central server.
System.dat Hardware or computer-specific settings (the hardware profile) are contained in the System.dat file. It contains all the hardware configuration, Plug and Play settings, and application settings. It is always stored as a hidden file on the local machine in the Windows 98 directory.
Policy.pol System policies are designed to provide an override for any settings contained in the other two registry components. System policies can contain additional data specific to the network or corporate environment, as established by the network administrator. The system policies themselves are contained in the Policy.pol file. Unlike System.dat and User.dat, Policy.pol is not a mandatory component of a Windows 98 installation.

Benefits of the Registry Structure

Breaking the registry into three logical components provides several benefits.
  • The registry components can be located in physically different locations. For example, the System.dat component and other Windows 98 system files might be located on the computer's hard disk, and the User.dat component can be stored in one master network directory, and then copied to the hard disk during logon. With this configuration, users can log on to various computers on the network and still have their unique network privileges and desktop configuration, allowing "roving user" network configuration for Windows 98
  • The registry and all of the system files can be installed on the local hard disk. With this configuration, multiple users can share a sungle computer running Windows 98. each user has a separate logon user name, separate user profile, separate privileges, and separate desktop configuration
  • The network administrator can manage an entire network's user privileges by having a single, global Policy.pol file. Or, the network administrator can establish these policies on a server basis or on a per-user basis. In this fashion, a network administrator can centrally enforce a "common desktop configuration" for each user type. For example, a data-entry computer running Windows 98 can be configured so that only two applications (the data entry application and e-mail) can be run. Additionally, the network administrator can specify that data-entry users cannot modify this desktop configuration. In spite of this configuration, the computer running Windows 98 can fully participate in the network, and is fully configurable if a different user with more network privileges logs on to the same computer.
  • Separate privileges can be assigned to users and to a computer. For example, if a user who has sharing privileges logs on to a computer running Windows 98 that has no sharing (no peer services), the user cannot access the computer's resources. This feature is useful if certain computers contain sensitive data that should not be available to everyone on the corporate network.

How Windows 98 Components Use the Registry

The registry contains ordered pairs of keys and their associated values that are manipulated through the Win32 registry application programming interfaces (APIs). For example, the registry might have a Wallpaper key with an associated value of Work.bmp, meaning that the current desktop background is configured to use the Work bitmap.

Additionally, a special category of keys known as dynamic keys points to either a memory location or a callback function. Dynamic keys are used by device drivers or Windows 98 subsystems that want to register a dynamic data type, such as a counter, in the registry. In the case of network cards, the dynamic keys represent data, such as data transfer rates, number of framing errors, packets dropped, and so on. In general, dynamic keys are used for reporting data, not for storage in the disk-based registry. Because the dynamic keys exist only in memory, their data can be quickly updated and accessed. The data can be accessed by the system performance tools in Windows 98, which call upon the registry for the data they are monitoring.

Keys and values can be created either programmatically or by using the Registry Editor (REGEDIT) tool. The APIs for programmatically managing the registry are the Win32 registry APIs, which can be remotely invoked by the Microsoft remote procedure call (RPC) (distributed computing environment [DCE] - compliant) support built into Windows 98. Windows 98 includes both the client and server portions of Microsoft RPC, making the registry manageable remotely from another computer running Windows 98. In this scenario, the network administrator's system is the RCP client. It accesses the registry APIs on the target computer running Windows 98 through the RPC server running on the target machine. This RPC access to the registry is secure, and network administrators can limit access to either specified privileged users or a group of network administrators.

With Windows 98, the operating system stores and checks the configuration information in the registry for most configuration settings during system startup. Windows 98 components and applications also use the registry for storing and accessing configuration information:

  • Whenever you run Windows 98 Setup, use the Add New Hardware option in Control Panel, or run other setup programs for hardware, the Windows 98 Configuration Manager places hardware configuration data in the registry. This information includes a list of hardware detected in the computer.
  • If you install Windows 98 in the same directory as Windows 3.x, your previous desktop settings are moved from INI files to the registry. When you make changes to the desktop configuration, the settings are added to the registry.
  • Each time you add or remove a Plug and Play - compliant device on a computer running Windows 98, configuration data is added to the registry. For example, new information is added when you install a PC Card modem.
  • Device drivers send and receive load parameters and configuration data from the registry. This data is similar to what you might find on the device= lines in the Config.sys file in Windows 3.x. A device driver can access this registry information to provide users with smart installation and configuration programs.
  • System policies, user profiles, and administrative tools (such as the Control Panel) can be used to add or modify configuration data in the registry indirectly. Registry Editor can be used to view and occasionally change the system configuration.

Overview of the Main Registry Tools

Recommended tools to modify the registry

The simplest and safest way (and the recommended way) to modify the registry is to use the tools listed:

Control Panel Most system settings. For example, you use Display properties to modify the appearance of screen elements.
System Policy Editor User settings, some system settings
Third-party utilities Application-specific settings

You can also modify the registry using Registry Editor, but use it sparingly and carefully. If you use Registry Editor, always back up the registry before changing anything.
Whenever possible, use administrative tools, such as Control Panel or System Policy Editor to make configuration changes, rather than Registry Editor. This is to ensure values are stored properly in the registry when changing the configuration.