Chapter 13. The Registry

The Windows Registry is a database of settings used by Windows Vista and the individual applications that run on it. Knowing how to access and modify the Registry effectively is important for troubleshooting, customizing, and unlocking hidden features in Windows Vista.

An amazing amount of what you might assume to be "hardwired" into Windowsthe locations of key directories, the titles of on-screen objects such as the Recycle Bin, and even the version number of Windows Vista reported in the Control Panelis actually the product of data stored in the Registry. Change a setting in the Registry, and key parts of your system can be affected; for this reason, Microsoft passively discourages tampering by providing only minimal user documentation on the Registry Editor and no documentation at all on the structure of the Registry itself.

Despite the enormous potential for harm, the Registry is fairly robust, and for every entry that you can wreak havoc by changing, there are hundreds that you can change with impunity. Nonetheless, you should back up the Registry files before making significant changes with the Registry Editor. See "Backing Up the Registry," later in this chapter, for details.

The Registry is normally consulted silently by the programs (such as Explorer) that comprise the Windows user interface, as well as by nearly all applications. Programs also commonly write varying amounts of data to the Registry when they are installed, when you make changes to configuration settings, or just when they are run. For example, a game such as FreeCell keeps statistics in the Registry on how many games you've won and lost. Every time you play the game, those statistics are updated. For that matter, every time you move an icon on your Desktop, its position is recorded in the Registry. All of your file type associations are stored in the Registry, as are all of the network, hardware, and software settings for Windows and all of the particular configuration options for most of the software you've installed. The settings and data stored by each of your applications and by the various Windows components vary substantially, but more often than not, a given Registry setting will appear in plain English, making it relatively easy to decipher. There are also several advanced techniques that not only help to identify more obscure settings, but also allow you to use undocumented settings to uncover hidden functionality.

Microsoft provides the Registry Editor (regedit.exe), which is used to view and modify the contents of the Registry. Don't confuse the Registry with the Registry Editor; the Registry Editor merely reads and writes data in the Registry like any other Windows application. When you start the Registry Editor, you'll see a window similar to the one in Figure 13-1.

Figure 13-1. The Registry Editor, which uses a familiar interface to manipulate unfamiliar data

The organizational structure of the Registry is hierarchical, so Microsoft chose an interface familiar to anyone who has used Windows Explorer. As in Explorer, there are two panes: the folders (keys) are displayed in a cascading tree on the left, and the contents of the currently selected key appear on the right. Use the small right- and downward-facing triangle icons to expand and collapse the branches, respectively; cursor keys also work here.

Although the interface elements might appear familiar, the data that you manipulate with the Registry Editor is nothing like the files and folders you are used to dealing with in Explorer. Although you can certainly dive in and begin wading through the thousands of keys and values in the Registry, you're not likely to find anything of value until you arm yourself with a basic understanding of the way data is stored and organized in the Registry. And, of course, this is the focus of the next few sections.

Part II: Nutshell Reference