• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 3. The Registry > Search the Registry Effectively

3.8. Search the Registry Effectively

The Registry Editor has a simple search feature, allowing you to search through all the keys and values for text. Just select Find from the Registry Editor's Edit menu, type the desired text, and click Find Next. Because the Registry can become quite large and have a wide variety of settings and information, it is important to learn to search effectively, so you don't miss anything or waste a lot of time wading through irrelevant results. Additionally, the Registry Editor doesn't have a search-and-replace feature, so doing something as simple as changing every occurrence of c:\program files to d:\program files can be a monumental chore. Here are some tips that may help:

  • Make sure that all three options in the Find window's Look at section are checked, unless you know specifically that what you're looking for is solely a Key, Value (value name), or Data (value contents). You'll also usually want the Match whole string only option turned off.

  • Many folder names in the Registry are stored in both long and short versions. For example, say you want to move your Program Files folder from one drive to another (see Section 4.2.1 in Chapter 4 for more information). When you install Windows, any settings pertaining to this folder may be stored in the Registry as c:\Program Files or c:\Progra~1. Make sure you search for both.

  • If you're searching the Registry for both Program Files and Progra~1, you may want to just search for progra, which will trigger both variations. Because this will trip upon other uses of the word program, try placing a backslash ( \ ) in front of it, like this: \progra, to limit the search to only directory names beginning with those letters. A minute of mental preparation can save you an hour of searching.

  • You may want to search the Registry for an interface element, such as a new item added to a context menu or text in a list in a dialog box. If the text contains an underlined character, you'll need to add an ampersand (&) to the search string. For example, say you've installed a program that creates .zip files (such as WinZip; http://www.winzip.com), and the program has added the command Add to Zip to the context menu of all files that you wish to remove. You'll need to search for add to &zip to match the text properly; a search for add to zip will probably turn up nothing. Note also that text searches are not case-sensitive, so you don't have to worry about capitalization.

  • Searching begins at the currently selected key. If you want to be sure to search the entire Registry, make sure the My Computer entry at the top of the Registry tree is highlighted before you begin. However, if you know the setting you want to change is in, for example, HKEY_LOCAL_MACHINE, you should highlight that key beforehand to reduce search time and eliminate irrelevant results.

  • Although the Registry Editor has a search feature, it doesn't allow you to search and replace (which is probably a good thing). If you have a branch of settings you wish to change (for example, if you've moved an application from one drive to another or want to, say, replace every occurrence of notepad.exe with another application), you can use a Registry patch—see Section 3.5 earlier in this chapter. Just create a patch of the branch in question and use your favorite text editor's search-and-replace feature to change the values in the patch. When you apply the patch, all the settings will be changed for you. Note that you should use this with caution, because you can screw up many settings unwittingly by searching and replacing common pieces of text.

  • If you find yourself wanting to use search and replace more often, and the previous Registry patch tip isn't sufficient, you may want to try the Registry Search and Replace utility. It's a bit safer and more flexible, too. See Section 3.12 at the end of this chapter for more information.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint