Section B.1. Meet Regedit


B.1. Meet Regedit

Windows comes with a built-in program for editing Registry entries, a little something called (what else?) the Registry editor. (There are dozens of other Registry-editing, Registry-fixing, and Registry-maintenance programs, tooboth commercial and sharewarebut this one is already on your PC.)

As an advanced tool that Microsoft doesn't want falling into the wrong hands, the Registry editor has no Start-menu icon. You must fire it up by typing its name into the Start menu's search box. Type regedit to find the program; select it in the results list.

Authenticate yourself (page 191). After a moment, you see a window like Figure B-1.

Figure B-1. The Registry's settings are organized hierarchically; in fact, the Registry editor looks a lot like Windows Explorer. But there's no easy way to figure out which part of the Registry holds a particular setting or performs a particular function. It's like flying a plane that has no windows .


B.1.1. The Big Five Hives

It turns out that Microsoft has arranged all of those software settings into five broad categories. Microsoft calls them hives or root keys , but they look and act like folders in a Windows Explorer window. You expand one of these folders (keys) just as you would in Explorer, too, by clicking the little flippy triangle button beside its name.

The names of these five hives are, frankly, just as weird as the term hives itself:

  • HKEY_CLASSES_ROOT . This root key stores all kinds of information about files: filename extensions, file types, shortcut menus , and so on.


    Note: A number of Registry entries appear in more than one place, live mirrors of each other, for convenience and clarity. Edit one, and you make a change in "both" places.This root key, for example, is a pointer to the key at HKEY_LOCAL_MACHINE\SOFTWARE\Classes. (More on this slash notation below.)
  • HKEY_CURRENT_USER . As you'd guess, here's where you'll find the settings pertaining to your account: your desktop arrangement, your wallpaper setting, and so on, plus information about connections to printers, cameras , and so on. (This key, too, is a live duplicateof the identical one in HKEY_USERS, described below.)

  • HKEY_LOCAL_MACHINE . All about your PC and its copy of Windows. Drivers, security settings, hardware info , the works.

  • HKEY_USERS . Here's where Windows stores the information about all of the account holders ( user profiles) on your PC, including the "Current_User's." You'll rarely be asked to edit this root key, since the good stuffwhat applies to your own accountis in the CURRENT_USER key.

  • HKEY_CURRENT_CONFIG . Most of this root key is made up of pointers to other places in the Registry. You'll rarely be asked to edit this one.

B.1.2. Keys and Values

If you expand one of these hives by clicking its flippy triangle, you'll see long list of inner "folders," called keys . These are the actual settings that the Registry tracks, and that you can edit.

Some keys contain other keys, in fact. Keep clicking the + buttons until you find the key you're looking for.

In books, magazines, and tutorials on the Web, you'll often encounter references to particular Registry subkeys written out as a Registry path , like this:

 HKEY_CURRENT_USER  Control Panel  Mouse 

(You may see backslashes used instead of the arrows.) That instruction tells you to expand the HKEY_CURRENT_USER root key, then expand Control Panel within it, and finally click the Mouse "folder." It works just like a folder path, like C: Users Chris Desktop.

If you actually try this maneuver, you'll find, in the right half of the window, a bunch of keys named DoubleClickSpeed, MouseSpeed, MouseTrails, and so on. These should sound familiar, as they correspond to the options in the Mouse program of your Control Panel. (Figure B-2 clarifies this relationship.)

Figure B-2. A Control Panel program (like Mouse, shown at left) is nothing more than a user-friendlier front end for a bunch of underlying Registry keys (right) .


Each value usually contains either a number or a block of text. DoubleClickSpeed, for example, comes set at 500. In this case, that means 500 milliseconds between clicks, but each Registry value may refer to a different kind of unit.


Tip: Many of the Windows Explorer keyboard shortcuts also work in regedit. For example, once you've clicked a key, you can press the right or left arrow to reveal and hide its subkeys. You can also type the first letter of a subkey's name to highlight it in the left panesame with a value's name in the right pane. And you can press the Backspace key to jump to the "parent" key, the one that contains the subkey .

B.1.3. Backing Up Key Values

In general, you won't go into the Registry unless you truly want to make a change. That's why the program is called regedit, not regviewer.

As you know, though, making the wrong change can botch up your copy of Windowsand regedit has no Undo command and no "Save change before closing?" message.

That's why it's essential to back up a Registry keyor even its entire root keybefore you change it. Later, if the change you made doesn't work the way you'd hoped, you can restore the original.

To back up a key (including and all its values and subkeys), just select it and then choose File Export. Save the resulting key somewhere safe, like your desktop. Later, you can reinstate the key by double-clicking the .reg file you exported. (Or, if youre paid by the hour , open regedit, choose File Import, and manually open the .reg file.)


Note: Importing a .reg file merges it with the data already in the Registry. Any values you edited will go back to their original versions, provided you haven't renamed them.This means, for instance, that if you export a key, rename one of the values in that key, and then re-import the .reg file, the value you renamed will still be there, along with the value by its original name. In other words, a .reg file is a very good idea, but it's not a "get out of jail free card" that undoes all types of changes.The only way to get a true Registry backup is to back up the Registry hive files themselves . Only the Complete PC Backup program described on page 647 can do this for you.



Windows Vista. The Missing Manual
Windows Vista: The Missing Manual
ISBN: 0596528272
EAN: 2147483647
Year: 2006
Pages: 284
Authors: David Pogue

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