Troubleshooting and Configuring the Windows NT/95 Registry
-10-Making Manual Changes to the Registry Using REGEDIT.EXEMost users who have been using Windows NT for a long time have used REGEDT32.EXE, the Windows NT Registry Editor. Windows 95 users, or NT users coming from a Windows 95 background, however, have always used REGEDIT.EXE. The good news is that both are included with Windows NT 4.0, and you can use either. Windows 95 users don't have a choice. There are significant differences, however, in the features that each possesses.
Each has its strengths and weaknesses, and most NT users will end up using both.
Table 10.1 compares REGEDT32 with REGEDIT.
REGEDT32.EXE focuses more on the high-security, hardware-level editing, whereas REGEDIT.EXE is designed for ease of use and broad appeal. Most tasks you perform can be done in REGEDIT.EXE with no problem, and, in many cases, it can be done more easily and quickly than with REGEDT32.EXE.
Protecting the Registry with REGEDIT.EXEThe Registry is no less vulnerable with REGEDIT.EXE than with REGEDT32.EXE. Indeed, it may be more vulnerable because there is no read-only mode. Without a read-only mode, utmost care must be taken to protect the Registry from damage. Back up the Registry with the tools listed in Chapter 4, "Protecting the NT Registry," and Chapter 6, "Protecting the Windows 95 Registry," or use the export features in REGEDIT.EXE as discussed later in this chapter. Editing the Registry with REGEDIT.EXERun REGEDIT.EXE from the Start | Run menu. You will see all the handle keys represented on one screen. (See Figure 10.1.) Similar to the Explorer interface, REGEDIT.EXE is easy to use and straightforward in its procedures, and it's easy to understand the relationships between keys. Figure 10.1. The interface of REGEDIT.EXE.
The folders cascade and consolidate with a single-click on the plus (+) and minus (-) signs to the left of the key names. You don't even have to wait for the display of all the values in the key. To open the key and see inside, a single-click on the key name is required, as shown in Figure 10.2. Figure 10.2. Cascaded folders in REGEDIT.EXE.
Shortcut for Faster Collapsing of the Registry ViewWhen the Registry is expanded, the connection to the parent key is shown with a dotted line, as illustrated in Figure 10.3. Although you can scroll up until you find the Collapse button, or you can collapse individual sections, it is faster to collapse entire trees. Figure 10.3. Double-click the vertical line to collapse the tree.
Adding Keys to the RegistryAdditional keys can be added to the Registry by application installation routines, driver installation, or manually. To manually add a key below another, highlight the current key, select Edit | New | Key, and type the name. The new key will be cascaded below the current key, and a plus sign will be added to the left of the key name, as shown in Figure 10.4. Figure 10.4. Adding a new key in REGEDIT.EXE.
Figure 10.5. Pop-up menu for the Registry Editor title bar. Figure 10.6. Pop-up menu for a Registry key. Figure 10.7. Pop-up menu for a Registry value. Figure 10.8. The general pop-up menu for the Registry Editor.
Values in REGEDIT.EXEThe values in the REGEDIT.EXE window are in the right pane, listed in alphabetical order, as shown in Figure 10.9. Figure 10.9. Values in the Winlogon key.
REGEDIT.EXE only shows two value types: string and binary. String values include standard strings as well as expandable strings. Any variable (such as %systemroot%) is automatically considered expandable, so an additional editor is not required. Binary entries include both binary and DWORD entries, with binary being variable-length values, and DWORD being fixed-length 32-bit values. For more detail on value types, see Chapter 2, "The Structure of the Registry." Adding Values to the Registry with REGEDIT.EXETo add a new value to a key, right-click in any empty space in the right pane in the REGEDIT.EXE window. The right mouse button click brings up a menu choice to add either a string, binary, or DWORD value (refer to Figure 10.8). Notice that the options do not include a multistring editor. That makes adding a multistring virtually impossible. There is also no specific entry for a variable string, assuming that a normal string editor will work the same. Any variable will automatically expand or contract the size of the string as necessary when replaced with the variable. When you select the option to create a string value, REGEDIT.EXE responds with a new value, as shown in Figure 10.10. Figure 10.10. A new value created with REGEDIT.EXE.
Occasionally, you will be asked to add a default value for a key. A default value cannot be added to an existing key, but one is created with every new key.
Editing ValuesTo edit a value, double-click the value name or right-click it and choose Modify. (See Figure 10.11.) Choosing Modify allows you to change the data, not the name of the value. Figure 10.11. Editing a string value.
To edit an expandable string, use the standard string editor and put your variables in as required. REGEDIT.EXE assumes any variable that is put into a string is going to be replaced by data, not used as literal text. Figure
10.12. Editing a
binary value.
Finding Specific Entries in the RegistriesSearching the Registry with REGEDIT.EXE is very powerful, much stronger than the search capabilities of REGEDT32.EXE. In REGEDIT.EXE, you can search for keys, value names, data, or any combination of the three. To search the Registry, select Edit | Find, press Ctrl+F, or right-click the left pane. Select the type of data to search for, whether to restrict the search to the full string, and the string to be found. For example, if you want to find the Shutdown options, type the word shutdown in the Find what field of the Find dialog box. (See Figure 10.14.) Select Find Next or press Enter to start the search. If the search is successful, it highlights the found string. (See Figure 10.15.) Figure
10.14. Searching
the Registry by keys, values, or data.
If the search is unsuccessful, the dialog box in Figure 10.16 appears, indicating that the search has been completed. Upon confirmation, REGEDIT.EXE returns you to the last highlighted location. Figure 10.16. Unable to find data in the Registry.
Exporting Registry DataWith REGEDIT.EXE, it is easy to export a key, handle key, or even the whole Registry to a file that can be edited with a text editor. To export the Registry as a text file, select the key and use Registry | Export Registry File, which invokes the dialog box shown in Figure 10.17. Having this data as a text file makes it easier to troubleshoot. You can open a broken Registry and use a document-comparison feature of a word processor to compare it with a working Registry. Additionally, you can export the software key in HKEY_LOCAL_MACHINE, add new software, and compare the current settings with the previous settings to determine what the software Figure 10.17. Exporting the Registry with REGEDIT.EXE.installation did.
Figure 10.18. The contents of the exported Registry key.
The exported data can be confusing to read. As you can see in Figure 10.18, every
alphanumeric text string is contained in quotes. Table 10.2 is a legend of the other
conventions used by the document.
With the information in this table, you should be easily able to browse, read, understand, and edit the Registry with an exported text file.
Importing a Registry FileAfter the .REG file has been edited or updated, it can be swiftly imported into the Registry. Select the key where the file will be imported, and using the Registry | Import Registry File menu item, select the new file. It overwrites all the current entries and updates the Registry. If this action is successful, you will see the dialog shown in Figure 10.19. Figure 10.19. The Registry is updated with the imported .REG file.
Figure 10.20. The association for a .REG file is in the Registry.
SummaryREGEDIT.EXE will do most of the editing functions necessary to most people. Its easy-to-use features, speed, and convenience make it a great choice for anyone needing to edit the Registry. If you could use it to edit REG_MULTI_SZ entries and REG_FULL_DESCRIPTOR entries, and had the read-only mode and security of REGEDT32.EXE, REGEDIT.EXE would probably be the choice of most system administrators. Because of the feature mix between REGEDT32.EXE and REGEDIT.EXE, most administrators will use both, and you should, too. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|