The Windows Registry

Mention "the registry" to PC users, and they'll probably think of standing in line for license plates, not the set of configuration files built into Microsoft Corp.'s operating systems.

And Microsoft thinks that's the way it should be. The Windows registry stores important information about a computer's configuration. Users who modify the registry improperly could cause the operating system to become unstable or even unusable, according to Mike Coleman, a Microsoft product manager.



Trained IT administrators, on the other hand, may benefit from editing the registry to manage and configure a user's desktop. For example, they can lock down the operating system by hiding certain menu items or adjust security settings to ensure that users adhere to company policies.

In the Beginning

Microsoft introduced the Windows registry in 1995. Prior to Windows 95, the operating system used text files to track configuration information, but those files didn't have a common structure, and they were limited in the types of information they could store.

If a user deleted one of the initialization files, there was no easy way to deal with the problem, says Coleman. "We wanted to have a system that was less prone to error," he says.

The registry can back up and restore configuration settings both automatically and manually, and Microsoft has worked to make the registry more stable, self-maintaining and self-repairing, Coleman says. To gain greater flexibility in the types of data that can be stored, Microsoft switched from text configuration files to a binary architecture, he notes.

Users can make some changes to the Windows registry indirectly, via the control panel. An advanced user may opt for TweakUI, a tool introduced as a free download with Windows 98, to adjust the user interface settings, says Coleman.

A user also can make changes to the registry indirectly via software applications. For instance, Microsoft Office maintains a list of recently used documents, and a user who doesn't want to keep that list can change the configuration parameter within the application to turn off the feature, Coleman says.

As critical as it is, the Windows registry can also be edited directly by a user or by software applications and installation programs. To edit the registry directly, a user can utilize the Regedit or Regedt32 tools that come with Windows.

Different Strokes

When viewed through an editing tool, the registry on a Windows 9x operating system looks identical to the registry of Windows NT-, 2000- and XP-based systems. But Coleman says they're represented differently on disk.

The Windows 9x registry comprises two files: system.dat and user.dat. Windows Me adds a classes.dat file. Both system.dat and user.dat are stored in the \windows directory, unless the system is set up for individual user profiles; then the user.dat file is stored in \windows\profiles\ username, Coleman says.

The registry for the Windows NT, 2000 and XP family is stored in multiple files in several subdirectories, and the user.dat file has a physically different structure than the user.dat file in Windows 9x.

Coleman notes that IT administrators can apply permissions to registry entries in Windows NT, 2000 and XP systems to prevent users from accidentally or unwittingly overwriting key registry data.

Windows 98 and Me have registry-scanning tools that can find and fix problems. A scan can be run manually to check the system, find problems and compact and clean the database, Coleman says.

The registry is automatically backed up each day. Coleman advises users to "treat backing up the registry just like you treat backing up your data. . . . Anytime you're going to adjust or tweak the registry, backups should be made on removable media."

Read accompanying stories:

See additional Computerworld QuickStudies

Copyright © 2002 IDG Communications, Inc.

It’s time to break the ChatGPT habit
Shop Tech Products at Amazon