Heart and Soul of Windows XP

Windows XP stores configuration data in the registry. The registry is a hierarchical database, which you can describe as a central repository for configuration data (Microsoft's terminology) or a configuration database (my terminology). A hierarchical database has characteristics that make it ideally suited to storing configuration data. Lay out the database in a diagram, like the one shown in Figure 1-1, and it looks like an outline or organization chart. This allows settings to be referenced using paths, similar to file paths in Windows XP. For example, in Figure 1-1, the path A\G\M references the shaded box. Also, each setting is an ordered pair that associates a value's name with its data, similar to the way the IRS associates your social security number with your tax records. The registry's hierarchical organization makes all settings easy to reference.

click to expand
Figure 1-1: The registry is a hierarchical database that contains most of Windows XP's settings.

You can do nothing in Windows XP that doesn't access the registry. I use a tool to monitor registry access and often leave it running while clicking around the operating system's user interface. I almost never see this monitor idle. With every click, Windows XP consults the registry. Every time I launch a program, the operating system consults the registry. Every application I use looks for its settings in the registry. The registry is certainly the center of attention.

I've written other books about the registry, and in them I call the registry the operating system's heart and soul. Aside from being a central place to store settings, the registry by its very nature allows complex relationships between different parts of Windows XP, applications, and the user interface. For example, right-click different types of files and you see different shortcut menus. Settings in the registry make this type of context-sensitive user interface possible. The settings for each user who logs on to Windows XP are separate from those of other users—again because of the registry. Windows XP's ability to use different configurations for laptop computers depending on whether they're docked or undocked is due in large part to the registry. Even Plug and Play depends on the registry.

For Power Users

So the registry is important, but what good is learning about it for power users? Well, first, being a technology enthusiast (the high-brow way to say geek) implies that you like to dabble with technology to learn more about it. What better way to learn more about Windows XP than to figure out how and where it stores settings? The process is analogous to tearing apart your VCR so that you can learn how it works. If you've ever wondered why the operating system behaves a certain way, the answer is often found by consulting the registry.

Mastering the registry has concrete advantages for power users, though. Because it is the operating system's configuration database, backing up your settings is a bit easier than it would be without the registry. And unlike in the old days when settings were stored in INI files, you always know where to begin looking when you need to find a value. But the biggest advantage of mastering the registry is more exciting and very real: You can customize Windows XP and the applications that run on it in ways that aren't otherwise possible. Windows XP has thousands of settings that you'll never see in any dialog box but that you might want to customize. For example, you can redirect your Favorites folder to a different place, improve your Internet connection's performance, and add commands to any type of file's shortcut menu. Chapter 4, "Hacking the Registry," details many different customization possibilities.

For IT Professionals

IT professionals rely on the registry because it enables most of the management features they use. Large portions of this book focus on those features and how they use the registry.

Policy management is the biggest feature. IT professionals use policies to configure computer and user settings to a standard, and users can't change those settings. For example, I recently used policies to configure users' screen savers so that they lock the desktop after 15 minutes of idle time, which secures users' computers if they walk away from their desks without logging off from Windows XP. Policy management is a great boon to every IT organization because it can lower costs and boost user productivity.

IT professionals can manage the registry's security, which lets users run legacy applications in their restricted accounts instead of logging on to their computers as Administrator (a bad idea in any enterprise environment). You can manage the registry's security directly or using a tool such as Security Configuration And Analysis to automate the process. (For more information, see Chapter 7, "Managing Registry Security.")

Also, IT professionals can use a combination of scripts and the registry to automate customizations. One IT professional with whom I worked recently wrote scripts to clean up and configure users' computers after installing Windows XP on them. You can address most needs with a good script.

An indirect but important benefit of the registry to IT professionals is application compatibility. Microsoft defines standards for where different types of settings belong in the registry. The company has standards for file associations, Plug and Play configuration data, printer settings, application settings, and much more. Applications that follow these standards are more likely to work well with the operating system, not to mention other applications, because they're all looking for the same settings in the same places. For that matter, most applications that work well in Microsoft Windows 2000 will work just fine in Windows XP, given that the overall structure of the registry doesn't change much between the operating systems.

The registry enables too many other management features for IT professionals to neglect mastering it. Some of those features include the following (see Figure 1-2):

  • Deployment customization

  • Folder redirection

  • Hardware profiles

  • Offline files

  • Performance monitoring

  • Roaming user profiles

  • Windows Management Instrumentation

click to expand
Figure 1-2: The registry enables local and remote administration.

start sidebar
Brief History of the Registry

MS-DOS got its configuration data from Config.sys and Autoexec.bat. The primary purpose of Config.sys was to load device drivers, and the primary purpose of Autoexec.bat was to prepare MS-DOS for use by running programs, setting environment variables, and so on. Every application that ran on MS-DOS was responsible for managing its own settings. Neither of these configuration files is useful in Windows XP.

Microsoft Windows 3.0 alleviated the limitations of Autoexec.bat and Config.sys a bit by providing INI files for storing settings. INI files are text files that contain one or more sections with one or more settings in each section. You've undoubtedly seen plenty of them. The problem with INI files is that they provide no hierarchy, storing binary values in them is cumbersome (although not impossible), and they provide no standard for storing similar types of settings. INI files have other subtle problems, all related to the configuration file's inability to build complex relationships between applications and the operating system. A bigger problem with INI files and early versions of Windows was the sheer number of them that floated around the average computer. Every application had its own INI files.

Windows 3.1 introduced the registry as a tool for storing OLE (object linking and embedding) settings, and Windows 95 and Windows NT 3.5 expanded the registry to the configuration database that Windows XP uses now. Even though INI files are no longer necessary because applications now have a far better way to store settings, you'll always find a handful on any computer, including Win.ini.

A few years ago, people were more interested in the history of the registry than they are now. The registry has been around since before 1995, and everyone pretty much takes it for granted these days, so I won't waste any more book pages on its lineage. The history lesson is over; now you're living in the present.

end sidebar



Microsoft Windows XP Registry Guide
Microsoft Windows XP Registry Guide (Bpg-Other)
ISBN: 0735617880
EAN: 2147483647
Year: 2005
Pages: 185

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net