[Previous] [Next]
Lesson 2: Using Registry Editor
Most Windows 2000 users never need to access the registry. However, management of the registry is an important part of the system administrator's job and includes viewing, editing, backing up, and restoring the registry. You use Registry Editor to view and change the registry configuration.
After this lesson, you will be able to
- Edit the registry with Registry Editor.
Estimated lesson time: 40 minutes
Regedt32.exe
Setup installs Registry Editor (Regedt32.exe) in the systemroot\System32 folder during installation. However, because most users don't need to use Registry Editor, it doesn't appear on the Start menu. You start Registry Editor by clicking Run on the Start menu.
NOTEAlthough Registry Editor allows you to perform manual edits on the registry, it is intended for troubleshooting and problem resolution. You should make most configuration changes through either Control Panel or Administrative Tools. However, some configuration settings can be made only directly through the registry.
Setup also installs a second Registry Editor (Regedit.exe). Regedit.exe doesn't have a security menu or a read-only mode and doesn't support REG_EXPAND_SZ or REG_MULTI_SZ, so it is not the recommended Registry Editor for Windows 2000.
CAUTIONRegistry Editor saves data automatically as you make entries or corrections.
Using Registry Editor incorrectly can cause serious, system-wide problems that could require reinstallation of Windows 2000. When using Registry Editor to view data, save a backup copy of the registry file before viewing, and click Read Only Mode on the Options menu to prevent accidental updating or deleting of configuration data.
New registry data takes effect immediately. You can find some of the most useful Registry Editor commands on the Registry menu and the View menu in Registry Editor. Table 5.4 describes the commands on these menus.Table 5.4 Registry Editor Commands
Command | Menu | Description |
---|---|---|
Save Key | Registry | Saves part of the registry in binary format. It saves the currently selected key and all subkeys. You can then use this file with the Restore command to reload a set of values after testing a change. |
Restore | Registry | Loads the data in the selected file under the currently selected key. If the selected key was saved in the data file, Registry Editor will overwrite the key with the values in the file. |
Save Subtree As | Registry | Saves the selected key and all subkeys in a text file. You can then use a text editor to search for a specific value or key that was added or modified. Note that you can't convert this text file back to registry data. |
Select Computer | Registry | Opens the registry on a remote computer. Windows 2000 Server restricts remote access to the Administrators group, but Windows 2000 Professional allows remote access by any valid user account. To modify remote access permissions for either operating system, create this registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurePipeServers \winreg, of type REG_DWORD, with a value of 1. Permissions on this key define who can have remote access to the registry. |
Find Key | View | Searches the registry for a specific key. Key names appear in the left pane of Registry Editor. The search begins at the currently selected key and parses all descendant keys for the specified key name. The search is local to the subtree in which the search begins. For example, a search for a key in the HKEY_LOCAL_MACHINE subtree doesn't include keys under HKEY_CURRENT_USER. |
Practice: Using Registry Editor
In this practice, you will use Registry Editor to view the information in the registry. You will determine information such as the BIOS, the processor on your computer, and the version of the operating system. You use Registry Editor's Find Key command to search the registry for a specific word with key names. You modify the registry by adding a value to it, and you save a subtree as a file so that you can use an editor, like Notepad, to search the file.
Exercise 1: Exploring the Registry
In this exercise, you will use Registry Editor to view information in the registry.
- Ensure that you are logged on as Administrator.
- Start Registry Editor (Regedt32.exe).
- On the Options menu, click Read Only Mode to place a check mark to the left of the option.
- On the View menu, ensure that Tree And Data is selected.
- Maximize the Registry Editor window, and then maximize the window titled HKEY_LOCAL_MACHINE On Local Machine.
- Double-click the HARDWARE\DESCRIPTION\System subkey to expand it, and then answer the following questions: What is the basic input/output system (BIOS) version of your computer and its date?AnswerWhat is the computer type of your local machine according to the Identifier entry?Answer
- Expand the SOFTWARE\Microsoft\Windows NT\CurrentVersion subkey, and then fill in the following information.
Software configuration | Value and string |
---|---|
Current build number | |
Current version | |
Registered organization | |
Registered owner |
Exercise 2: Using the Find Key
In this exercise, you will use Registry Editor's Find Key command to search the registry to find a specific word in the key names in the registry.
- Click the HKEY_LOCAL_MACHINE subkey to ensure that the entire subtree is searched.
- On the View menu, click Find Key. The Find dialog box appears.
- In the Find What box, type serial
- Click Find Next and wait for the first matching entry to appear.
- Continue clicking Find Next until a Warning dialog box appears, indicating that Registry Editor can't find the desired key. Notice that this key appears in multiple locations in the registry.
- Click OK to close the Warning dialog box.
- Click Cancel to close the Find dialog box.
Exercise 3: Modifying the Registry
In this exercise, you will add a value to the registry.
- On the Options menu, click Read Only Mode. This will disable Read Only Mode, which was enabled in Exercise 1.
- On the Window menu, click HKEY_CURRENT_USER On Local Machine. The HKEY_CURRENT_USER window appears in Registry Editor.
- In the left pane of the Registry Editor window, click Environment. The values in the Environment key appear in the right pane of the Registry Editor window.
- On the Edit menu, click Add Value.
NOTE
If Add Value is unavailable, make sure Read Only Mode is not selected on the Options menu. If you are having problems deselecting Read Only Mode, exit Registry Editor and then restart it.
- In the Value Name box, type test
- In the Data Type list, click REG_EXPAND_SZ, and then click OK. The String Editor dialog box appears.
- In the String box, type %windir%\system32 and then click OK. test:REG_EXPAND_SZ : %windir%\system32 should appear in the right pane of the Registry Editor window.
- Minimize the Registry Editor window.
The Add Value dialog box appears.
- Right-click My Computer, and then click Properties. The System Properties dialog box appears.
- Click the Advanced tab, and then click Environment Variables. The Environment Variables dialog box appears.
- Close the Environment Variables dialog box, and then close the System Properties dialog box.
Exercise 4: Saving a Subtree as a File
In this exercise, you will save a subtree as a file. Saving a subtree as a file allows you to use Notepad or some other editor to search the file. The file can also be stored or printed as a record of the contents of the subtree and might come in handy for troubleshooting a problem, should something accidentally get changed in the registry.
- Restore the Registry Editor window.
- On the Window menu, click HKEY_LOCAL_MACHINE On Local Machine.
- Click HKEY_LOCAL_MACHINE\ SOFTWARE.
- On the Registry menu, click Save Subtree As. The Save As dialog box appears.
- In the Save In box, click Desktop.
- In the File Name box, type Software.txt and then click Save.
NOTE
You might experience a long delay while Registry Editor saves the subtree.
- Exit Registry Editor.
- On your desktop, double-click Software. Notepad opens the Software file.
- On the Edit menu, click Find. The Find dialog box appears.
- In the Find What box, type CurrentBuildNumber and then click Find Next.
- Click Cancel to close the Find dialog box.
- Scroll down (if necessary) to see the data for CurrentBuildNumber.
- Close Notepad.
Lesson Summary
In this lesson, you learned that you use Registry Editor (Regedt32.exe) to view and change the registry configuration. However, Registry Editor is primarily
intended for troubleshooting. For most configuration changes, you should use either Control Panel or Administrative Tools, not Registry Editor. You also learned that some configuration settings can be made only directly through the registry, and for these you use Registry Editor.You learned that you find some of the most useful Registry Editor commands
on the Registry menu and the View menu. These commands include Find Key, which allows you to search the registry for a specific key. The Save Key command allows you to save part of the registry in binary format. The Save Subtree As command allows you to save the selected key and all subkeys in a text file, and the Select Computer command allows you to open the registry on a remote computer.