Previous Table of Contents Next


Using The Registry Editor

The Registry Editor is a useful tool for administrators to use to tune the performance of the server, configure the installation, and solve client-related problems. As mentioned earlier, the registry is composed of keys, subkeys, values, and data. Each data element can be one of the following types:

  REG_SZ—A regular string.
  REG_MULTI_SZ—A multiple string value, where each string is separated by a carriage return.
  REG_EXPAND_SZ—An expanded string. This type of string will expand an embedded environment string into its actual value. For example, if you include the value %SystemRoot% in your string, the value of %SystemRoot%— generally C:\WINNT\—will be inserted into the string at the location you specified.
  REG_BINARY—A binary data element.
  REG_DWORD—A 32-bit data value.

The first time you use the Registry Editor, it will display five cascading windows. Each window is a shortcut to a specific registry key. For convenience, I have tiled my view, as shown earlier in this chapter in Figure 13.2. Notice that this view appears quite similar to the view in Windows NT Explorer. You have expandable folders in the left window pane (like directories), a split bar in the middle, and a right window pane that displays the subkeys (like subdirectories) and values with their associated data (like files). If you want to expand or compress a folder, or edit a value’s data (in the right window pane only), you can double-click on it.

There are a number of tasks you can perform using the Registry Editor. These tasks include adding a registry key or value, deleting registry keys or values, and searching for specific entries in the registry. You can also use the Registry Editor to restrict access to specific registry keys to prevent unauthorized access. And just like the Windows NT Explorer can be used to enable auditing information for directories and files, you can use the Registry Editor to enable auditing of registry keys. Auditing is particularly useful for pointing out those nosy users you have who may try and circumvent your server’s security. Once you know who they are, you can take action (a reprimand at least and firing them at most) to make sure they don’t do it again. The following sections discuss each of these tasks, followed by a short section introducing you to a few miscellaneous registry editor commands that you may find useful. Let’s start our exploration of the Registry Editor’s capabilities by adding a registry key.


TIP:  For your first time, you should set the Registry Editor to read-only mode via the Options|Read Only Mode menu option. This will prevent you from accidentally making errors while you browse through the registry.

Adding A Registry Key

The primary purpose of the Registry Editor is to manipulate registry keys and values. If you want to add a new a key to the registry follow the steps presented here:

1.  Select the key in the left window pane under which you want the subkey to be created, and highlight it.
2.  Select Edit|Add Key, and the dialog shown in Figure 13.3 should appear.
3.  Enter the name of the new key in the Key Name field, and enter a class type (REG_SZ, REG_MULTI_SZ, REG_EXPAND_SZ, REG_BINARY, or REG_DWORD) in the Class field. Then, click OK.


Figure 13.3  Adding a new key to the registry.

Adding A Registry Value

Adding a registry value is quite similar to adding a registry key. To add a new value to a key, follow the steps presented here:

1.  Select the key in the left window pane, and highlight it.
2.  Select Edit|Add Value and the dialog shown in Figure 13.4 should appear.
3.  Enter the name of the new value in the Value Name field, and select the data type from the drop-down list box in the Data Type field. Then, click OK.
After you click OK, an edit dialog box should appear. The name for this edit dialog box will vary depending on the data type. For a REG_SZ data type, the edit dialog box will be String Editor.
4.  Enter the value for the item, and press OK.


Figure 13.4  Adding a new value to the registry.

The new value and data will then be displayed in the right window pane.

Deleting A Registry Key Or Value

To delete a key or value, select the item, and then press the Delete key or use the menu option Edit|Delete. To delete just a value’s data item, double-click on the value (in the right window pane), and press the Backspace key for the highlighted entry in the Edit dialog. Then, click OK.

Before you go overboard deleting registry keys or values, you should save them. You can do so by selecting the key in the left window pane and then using the menu option Registry|Save Key. If you make a mistake while editing the key or value, you can use the Registry|Restore menu option to restore the key you just saved. You can use the Registry|Load Hive menu option to load a complete registry hive file under a new key that you will specify in the Key Name field of the Load Hive dialog.


Previous Table of Contents Next