DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 322754 - Last Review: August 24, 2007 - Revision: 3.2

This article was previously published under Q322754

On This Page

SUMMARY

This step-by-step article describes how to back up, edit, and restore the registry in Windows 95, Windows 98, Windows 98 Second Edition, and Windows Millennium Edition (Me). Microsoft recommends that before you edit the registry, you back up the registry and understand how to restore it if a problem occurs.

For additional information about the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986  (http://support.microsoft.com/kb/256986/EN-US/ ) Description of the Microsoft Windows Registry


How to Back Up the Registry

Before you edit the registry, export the registry keys that you want to edit, or back up the whole registry. If a problem occurs, you can then follow the steps in the How to Restore the Registry section of this article to restore the registry to its previous state.

How to Export Registry Keys

You can follow these steps to export a registry key before you edit it.

Note Do not follow these steps to export a whole registry hive (for example, the HKEY_CURRENT_USER hive). If you must back up a whole registry hive, back up the whole registry instead.
  1. Click Start, and then click Run.
  2. In the Open box, type regedit, and then click OK.
  3. Locate and then click the key that contains the value that you want to edit.
  4. On the File menu, click Export.
  5. In the Save in box, select a location where you want to save the .reg file, in the File name box, type a file name, and then click Save.

How to Back Up the Whole Registry

To back up the whole registry in Windows 98, Windows 98 Second Edition, or Windows Millennium Edition, run the Windows Registry Checker tool (Scanregw.exe). For additional information about using the Windows Registry Checker tool to back up the whole registry, click the article number below to view the article in the Microsoft Knowledge Base:
256419  (http://support.microsoft.com/kb/256419/EN-US/ ) How to Back Up the Registry in Windows 98 and Windows Millennium Edition
To back up the whole registry in Windows 95, you must manually back up the registry files. For additional information about manually backing up the registry files in Windows 95, click the article number below to view the article in the Microsoft Knowledge Base:
132332  (http://support.microsoft.com/kb/132332/EN-US/ ) How to Back Up the Registry in Microsoft Windows 95

How to Edit the Registry

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756  (http://support.microsoft.com/kb/322756/ ) How to back up and restore the registry in Windows
To edit the registry, Microsoft recommends that you follow the steps in the Microsoft documentation only. If it is possible, use the Windows user interface instead of directly editing the registry.

Use the Windows User Interface

Microsoft recommends that you use the Windows user interface if you can to change your system settings instead of manually editing the registry. On rare occasions, however, the best method for resolving a product issue may be editing the registry. If the issue is documented in the Microsoft Knowledge Base, an article with step-by-step instructions about how to edit the registry for that issue should be available. Always follow the instructions exactly in a Microsoft Knowledge Base article about editing the registry.

Use Registry Editor

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756  (http://support.microsoft.com/kb/322756/ ) How to back up and restore the registry in Windows
Editing the registry involves the following six procedures:
  • Locating a key, subkey, or value.
  • Adding a key.
  • Adding a value.
  • Changing a value.
  • Deleting a key or value.
  • Renaming a key or value.
Locating a Key, Subkey, or Value
There are five different top-level registry keys (or hives). They each start with "HKEY", for example:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft
Technically, in this example, HKEY_LOCAL_MACHINE is the key, and everything that follows the first backslash (\) is the subkey. In Registry Editor, you can view the keys and subkeys in the same way that you view your folders in Windows Explorer.

The keys and subkeys are listed in a folder tree in the left pane of Registry Editor. If you click a key or subkey in the left pane, you information appears in the right pane about the value name, type, and data.

As in Windows Explorer, in the left pane of Registry Editor, if a key or subkey contains subkeys, a plus sign (+) appears next to the folder icon for that key. If you click the plus sign, the folder expands and subfolders that represent the subkeys appear under it. After you expand a key, the plus sign changes to a minus sign (-). This indicates that the key has been expanded. To collapse the key, click the minus sign. When you do so, the subkey folders disappear and the minus sign changes back to a plus sign.

To locate the registry key listed in this section, follow these steps:
  1. Click Start, click Run, type regedit, and then click OK.
  2. Expand HKEY_LOCAL_MACHINE.
  3. Expand SOFTWARE.
  4. Click Microsoft.

    Note When you click the Microsoft subkey, the different values (but not subkeys) that it contains appear in the right pane. To view the subkeys, expand Microsoft. To locate a value, click the subkey that contains the value, and then view the contents of the right pane.
Adding a Key
To add a new subkey named TestSubkey to the registry key listed in this section, follow these steps:
  1. Expand HKEY_LOCAL_MACHINE.
  2. Expand SOFTWARE.
  3. Click the Microsoft subkey.
  4. On the Edit menu, point to New, and then click Key.
  5. Type TestSubkey, and then press ENTER.
Adding a Value
To add a new DWORD Value named TestDWORD and set its value data to 1 in the TestSubkey key, follow these steps:
  1. Expand HKEY_LOCAL_MACHINE.
  2. Expand SOFTWARE.
  3. Expand Microsoft.
  4. Click the TestSubkey subkey.
  5. On the Edit menu, point to New, and then click DWORD Value .
  6. Type TestDWORD, and then press ENTER.
  7. Right-click the TestDWORD DWORD Value, and then click Modify.
  8. Type 1, and then click OK.
Changing a Value
To change the value data for the TestDWORD DWORD Value to 0 in the TestSubkey key, follow these steps:
  1. Expand HKEY_LOCAL_MACHINE.
  2. Expand SOFTWARE.
  3. Expand Microsoft.
  4. Click the TestSubkey subkey.
  5. Right-click the TestDWORD DWORD Value, and then click Modify.
  6. Type 0, and then click OK.
Renaming a Key or Value
To rename the TestSubkey key to Test, follow these steps:
  1. Expand HKEY_LOCAL_MACHINE.
  2. Expand SOFTWARE.
  3. Expand Microsoft.
  4. Right-click the TestSubkey key, and then click Rename.
  5. Type Test, and then press ENTER.
Deleting a Key or Value
To delete the TestDWORD DWORD Value in the TestSubkey key, follow these steps
  1. Expand HKEY_LOCAL_MACHINE.
  2. Expand SOFTWARE.
  3. Expand Microsoft.
  4. Click the TestSubkey subkey.
  5. Right-click the TestDWORD DWORD Value, and then click Delete.
  6. Click Yes to confirm that you want to delete the value.
For more information about editing the registry, follow these steps in Registry Editor:
  1. On the Help menu, click Help Topics.
  2. On the Contents tab, double-click Changing Keys and Values, and then click the topic that you want.

Use a Registration Entries (.reg) File

Create a Registration Entries (.reg) file that contains the required registry changes, and then run the .reg file on the computer where you want to make changes. You can run the .reg file manually or by using a logon script. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
310516  (http://support.microsoft.com/kb/310516/EN-US/ ) How To Add, Modify, or Delete Registry Keys and Values by Using a Registration Entries (.reg) File

Use Windows Scripting Host

With the Windows Scripting Host, you can run VBScript and JScript scripts directly within the operating system. You can create VBScript and JScript files that use Windows Scripting Host methods to delete, read, and write registry keys and values. For additional information about these methods, visit the following Microsoft Web sites:
RegDelete Method
http://msdn2.microsoft.com/en-us/library/293bt9hh.aspx (http://msdn2.microsoft.com/en-us/library/293bt9hh.aspx)
RegRead Method
http://msdn2.microsoft.com/en-us/library/x05fawxd.aspx (http://msdn2.microsoft.com/en-us/library/x05fawxd.aspx)
RegWrite Method
http://msdn2.microsoft.com/en-us/library/yfdfhz1b.aspx (http://msdn2.microsoft.com/en-us/library/yfdfhz1b.aspx)


Use Windows Management Instrumentation

Windows Management Instrumentation (WMI) is a component of the Microsoft Windows operating system and is the Microsoft implementation of Web-Based Enterprise Management (WBEM). WBEM is an industry initiative to develop a standard technology for accessing management information in an enterprise environment. You can use WMI to automate administrative tasks (such as editing the registry) in an enterprise environment. WMI can be used in scripting languages that have an engine on Windows and handle Microsoft ActiveX objects.

For additional information about WMI, visit the following Microsoft Web site:
http://msdn2.microsoft.com/en-us/library/aa394582.aspx (http://msdn2.microsoft.com/en-us/library/aa394582.aspx)

How to Restore the Registry

How to Restore Registry Keys

To restore registry keys that you exported, double-click the .reg file that you saved in the How to Export Registry Keys section of this article.

How to Restore the Whole Registry

To restore the whole registry in Windows 98, Windows 98 Second Edition, or Windows Millennium Edition, run the Windows Registry Checker tool (Scanreg.exe) from MS-DOS. For additional information about using the Windows Registry Checker tool to restore the registry from MS-DOS, click the article number below to view the article in the Microsoft Knowledge Base:
221512  (http://support.microsoft.com/kb/221512/EN-US/ ) How to Manually Restore the Windows 98/Me Registry
To restore the whole registry in Windows 95, you must manually restore the registry files that you backed up in the How to Back Up the Whole Registry section of this article. For additional information about manually backing up the registry files in Windows 95, click the article number below to view the article in the Microsoft Knowledge Base:
132332  (http://support.microsoft.com/kb/132332/EN-US/ ) How to Back Up the Registry in Microsoft Windows 95

REFERENCES

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
132332  (http://support.microsoft.com/kb/132332/EN-US/ ) How to Back Up the Registry in Windows 95
221512  (http://support.microsoft.com/kb/221512/EN-US/ ) How to Manually Restore the Windows 98/Me Registry
183887  (http://support.microsoft.com/kb/183887/EN-US/ ) Description of the Windows Registry Checker Tool (Scanreg.exe)
245412  (http://support.microsoft.com/kb/245412/EN-US/ ) "System Restore Operation Failed" Error Message When Restoring Previous Registry
220878  (http://support.microsoft.com/kb/220878/EN-US/ ) Error Message: Restore Operation Failed
187680  (http://support.microsoft.com/kb/187680/EN-US/ ) "Out of Memory" Error Running Scanreg.exe with /Fix or /Restore
182841  (http://support.microsoft.com/kb/182841/EN-US/ ) Registry Backup Not Listed in Registry Checker Tool
184023  (http://support.microsoft.com/kb/184023/EN-US/ ) Command-Line Switches for the Registry Checker Tool
273889  (http://support.microsoft.com/kb/273889/EN-US/ ) Changes to the Registry Checker Tool (Scanreg.exe) in Windows Me
250410  (http://support.microsoft.com/kb/250410/EN-US/ ) Description of the Registry Files in Windows 98/95
273894  (http://support.microsoft.com/kb/273894/EN-US/ ) Unsupported Registry Backup & Restore Methods Corrupt Registry
201655  (http://support.microsoft.com/kb/201655/EN-US/ ) Error Message: You Have Restored a Good Registry...
183603  (http://support.microsoft.com/kb/183603/EN-US/ ) How to Customize Registry Checker Tool Settings
131431  (http://support.microsoft.com/kb/131431/EN-US/ ) How to Troubleshoot Registry Errors in Windows 95

APPLIES TO
  • Microsoft Windows Millennium Edition
  • Microsoft Windows 98 Second Edition
  • Microsoft Windows 98 Standard Edition
  • Microsoft Windows 95
Keywords: 
kbhowtomaster KB322754
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support