Bookmarking Favorite Subkeys
The Favorites feature is long in coming. Earlier versions of Regedit did not provide a way to bookmark the subkeys you use most, so you had to plow through the Registry's hierarchy every time you wanted to inspect the same old values. In Regedit, Favorites is akin to Favorites in Internet Explorer 5, which allows you to bookmark the Web sites you visit most often. Bookmark subkeys to which you want to return quickly.
Favorites works similarly in both programs and doesn't require much narrative to use it in Regedit. In the key pane, click the subkey you want to bookmark, and then click Add to Favorites on the Favorites menu. In the Add to Favorites dialog box, type a friendly name for the subkey. Regedit adds this friendly name to the Favorites menu, sorted in alphabetical order. Quickly return to the subkey by clicking its friendly name on the Favorites menu. Regedit opens the subkey in the key pane, expanding the hierarchy as necessary to reveal the subkey.
Just for grins, I include the following list, which contains the subkeys I usually bookmark and are the ones that I think are the most useful:
I usually bookmark Explorer and Policies under this subkey, too, keeping the Registry's most useful settings a couple of mouse clicks away.
Like the previous bullet, I usually bookmark Explorer and Policies to make them accessible.
Regedit stores your favorite subkeys in the Registry at HKCU\Software\Microsoft\Windows\ CurrentVersion\Applets\Regedit\Favorites. For each subkey you bookmark, it creates a REG_SZ value in Favorites. The value's name is the friendly name of the bookmark, which you typed in the Add to Favorites dialog box, and the value's data contains the fully qualified name of the subkey, including the computer's name and the root key: My Computer\HKLM. You can use the same bookmarks on any computer. Export this subkey to a REG file, which you learn to do later in this chapter, and then import that REG file whenever you want your favorite subkeys available.
Removing a subkey from the Favorites menu is counter-intuitive, as this is one of those features in Windows 2000 that doesn't require you to select an object before applying a command to it. Instead, click Remove Favorite on the Favorites menu and then, in the Remove Favorites dialog box, click the friendly name of the subkey you want to remove. This doesn't delete the subkey from the Registry; it only removes the subkey's bookmark from the Favorites menu.
Regedit has an annoying new feature that users usually want to disable the first time they experience it for themselves. Each time users close Regedit, it saves the selected subkey's fully qualified name. The next time they start Regedit, it opens that same subkey again, restoring the key pane to the way it was before they closed the program. This is crazy if you want to start Regedit fresh each time. (I like to close and restart Regedit just to clean up my mess in the key pane.) At this moment, the only way I know to disable this feature is to change your permissions to HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit using Regedt32 so that Regedit can't change this subkey. Doing so prevents Regedit from saving other settings, though. Alternatively, write a script that removes the REG_SZ value LastKey before launching Regedit. See Chapter 10 to learn about scripts.