ULTIMATE REGISTRY GUIDE Part I

Chapter 1: Learning the Basics
Overview
The registry has a subtle but important role in Microsoft Windows XP. On one hand, the registry is
passive—it's just a big collection of settings sitting on your hard disk, and you probably don't think
much about it while you're editing a document, browsing the Internet, or searching for a file. On the
other hand, it plays a key role in all those activities. The settings in the registry determine how
Windows XP appears and how it behaves. They even control applications running on your
computer. This gives the registry great potential as a tool for power users or IT professionals,
enabling them to customize settings that aren't available in the user interface.
This chapter introduces the registry to you. First you learn about the registry's role and how it fits
into your world. Then I explain some important terminology to ensure that we're speaking the same
language, and you see how Windows XP organizes the registry. Next you learn about the tools I
use to edit the registry. And last, you see how Windows XP stores the registry on the hard disk.
Throughout this chapter, you'll find several tidbits that are useful beyond the registry. For example,
you learn about the two different architectures for storing numbers in memory, which IT
professionals run into as much outside the registry as inside.
This is all basic information, but don't skip this chapter. Read it once, and you'll be set for the rest of
this book.
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.



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