Troubleshooting Tools and Strategies

Windows 2000 contains two registry editors (Regedit and Regedt32) that you can use to change settings in your system registry, which stores information about how the hardware and software on your computer runs. Windows 2000 stores its configuration information in a set of database files, organized into subtrees, keys, and subkeys, and displayed in a tree format by the registry editors. Although the registry editors enable you to inspect and modify the registry, normally you do not need to do so, and making incorrect changes can damage your system. An advanced user who is prepared to edit and restore the registry can use a registry editor for tasks such as eliminating duplicate entries, deleting entries for programs that have been uninstalled or deleted, verifying options and settings, or configuring options that are not accessible through the normal user interface.

If there is an error in your registry and your computer ceases to function properly, you can restore the registry to its state when you last successfully started your computer by starting the computer using the Last Known Good Configuration . For more information on the Last Known Good Configuration option, see Safe Mode earlier in this chapter.

warning-icon

Warning

Do not use a registry editor to edit the registry directly unless you have no alternative. The registry editors bypass the standard safeguards provided by administrative tools. These safeguards prevent you from entering conflicting settings or settings that are likely to degrade performance or damage your system. Editing the registry directly can have serious, unexpected consequences that can prevent the system from starting and require that you reinstall Windows 2000. To configure or customize Windows 2000, use the programs in Control Panel or Microsoft Management Console (MMC) whenever possible.

Before the registry is changed, it is highly recommended that you backup the registry files. For more information about backing up the registry, see Emergency Repair Process earlier in this chapter.

The five subtrees, through which all registry keys, subkeys, and assigned values are accessed, are defined in Table 31.20.

Table 31.20 Predefined Registry Subtrees

Key

Definition

HKEY_CURRENT_USER

Contains the root of the configuration information for the user who is currently logged on. The user's folders, screen colors, and Control Panel settings are stored here. This information is referred to as a user's profile.

HKEY_USERS

Contains the root of all user profiles on the computer. HKEY_CURRENT_USER is an alias for a subkey in the HKEY_USERS subtree.

HKEY_LOCAL_MACHINE

Contains configuration information particular to the computer (for any user).

HKEY_CLASSES_ROOT

A subkey of HKEY_LOCAL_MACHINE\Software. The information stored here ensures that the correct program opens when you open a file by using Windows Explorer.

HKEY_CURRENT_CONFIG

Contains information about the hardware profile used by the local computer at system startup.

Differences Between the Registry Editors

The registry editors included with Windows 2000 include Regedt32 and Regedit. Each registry editor has advantages and disadvantages. You can perform most tasks with either registry editor, but certain tasks are easier with one registry editor.

The following are advantages of Regedt32:

  • Using the Security menu, you can check for and apply access permissions to subtrees, keys, and individual subkeys.

  • Each subtree is displayed in its own dedicated window, reducing clutter.

  • You can set an option to work in read-only mode.

  • You can edit values longer than 256 characters.

  • You can easily edit REG_MULTI_SZ entry values.

  • You can load multiple registry files at the same time.
    note-icon
    Note
    From the Registry menu, select Load hive and open any registry file on disk. You can have more than one registry file open at one time. This feature is particularly useful when a computer with multiple installations of Windows 2000 cannot start from one of the installations due to a registry problem. If the cause of the problem is known, the user can start the computer from the secondary installation. Using Regedt32, the registry files from the primary installation can be loaded, edited, and saved, resolving the problem with the primary installation.

Figure 31.5 shows the Regedt32 interface.

Cc938997.pref05(en-us,TechNet.10).gif

Figure 31.5 Regedt32

The following are advantages of Regedit:

  • Regedit has more powerful search capabilities.

  • All the keys are visible in one Windows Explorer – like window.

  • You can bookmark favorite subkeys for fast access later on.

  • Regedit reopens to the subtree that was last edited.

  • You can export the registry to a text file.

  • You can import a registry file from the command line.
    note-icon
    Note
    To import a registry file from the command line, type
    regedit /s regfile
    where regfile is the full path and file name of the registry file to be imported.

Figure 31.6 shows the Regedit interface.

Cc938997.pref06(en-us,TechNet.10).gif

Figure 31.6 Regedit

important-icon

Important

Regedit cannot display registry values larger then 256 characters. Values that contain a larger number of characters are ignored and not shown. These values can only be edited by Regedt32.

Using the Registry Editors

Folders represent subtrees, keys, and subkeys and are shown in the navigation pane. In the topic pane, the registry entries in a subkey are displayed. When you double-click a registry entry, it opens an editing dialog box.

Within the registry editors, you can assign entries to new subkeys or alter the entries assigned to a currently selected subkey. Entries appear in the registry as strings that consist of three components separated by colons. For example, in the following registry entry:

RefCount : REG_DWORD : 0x1

RefCount is the entry name, REG_WORD is the data type, and 0x1 is the value of the entry.

For more information about using the registry editors for tasks such as saving a subtree, key, or subkey as a file, printing, importing, and exporting registry data, see Windows 2000 Professional Help and the Technical Reference to the Windows 2000 Registry (Regentry.chm) on the Windows 2000 Resource Kit companion CD.

Regedt32 provides the following ways to update registry display:

  • Auto Refresh (on the Options menu) automatically updates the registry when any change is made to registry data.

  • Refresh All (on the View menu) updates all of the information in all windows.

  • Refresh Active (on the View menu) updates only the information in the active window.

note-icon

Note

When Auto Refresh is in effect, a check mark appears next to the command and Refresh All and Refresh Active are unavailable.

You cannot use Auto Refresh while viewing a remote registry. If you click Auto Refresh while displaying a remote registry, the manual refresh options ( Refresh All and Refresh Active ) are not available. Although Auto Refresh appears to work, the contents of the remote registry window are not automatically refreshed.