Backup And Edit The Registry

This important information is quoted directly from Microsoft support files. If any links do not work contact Microsoft support for information.



Back up the registry

Before you edit the registry, export the keys in the registry that you plan to edit, or back up the whole registry. If a problem occurs, you can then follow the steps in the "Restore the registry" section to restore the registry to its previous state. To back up the whole registry, use the Backup utility to back up the system state. The system state includes the registry, the COM+ Class Registration Database, and your boot files. For more information about how to use the Backup utility to back up the system state, click the following article numbers to view the articles in the Microsoft Knowledge Base:

308422 (http://support.microsoft.com/kb/308422/) How to use the Backup utility that is included in Windows XP to back up files and folders

320820 (http://support.microsoft.com/kb/320820/) How to use the Backup utility to back up files and folders in Windows XP Home Edition

326216 (http://support.microsoft.com/kb/326216/) How to use the backup feature to back up and restore data in Windows Server 2003


Edit the registry

To modify registry data, a program must use the registry functions that are defined in the following MSDN Web site:

http://msdn2.microsoft.com/en-us/library/ms724875.aspx (http://msdn2.microsoft.com/en-us/library/ms724875.aspx)

Administrators can modify the registry by using Registry Editor (Regedit.exe or Regedt32.exe), Group Policy, System Policy, Registry (.reg) files, or by running scripts such as VisualBasic script files.

Use the Windows user interface

We recommend that you use the Windows user interface to change your system settings instead of manually editing the registry. However, editing the registry may sometimes be the best method to resolve a product issue. If the issue is documented in the Microsoft Knowledge Base, an article with step-by-step instructions to edit the registry for that issue will be available. We recommend that you follow those instructions exactly.

Use Registry Editor

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

You can use Registry Editor to do the following: • Locate a subtree, key, subkey, or value

• Add a subkey or a value

• Change a value

• Delete a subkey or a value

• Rename a subkey or a value 

The navigation area of Registry Editor displays folders. Each folder represents a predefined key on the local computer. When you access the registry of a remote computer, only two predefined keys appear: HKEY_USERS and HKEY_LOCAL_MACHINE.

Use Group Policy

Microsoft Management Console (MMC) hosts administrative tools that you can use to administer networks, computers, services, and other system components. The Group Policy MMC snap-in lets administrators define policy settings that are applied to computers or users. You can implement Group Policy on local computers by using the local Group Policy MMC snap-in, Gpedit.msc. You can implement Group Policy in Active Directory by using the Active Directory Users and Computers MMC snap-in. For more information about how to use Group Policy, see the Help topics in the appropriate Group Policy MMC snap-in.

Use a Registration Entries (.reg) file

Create a Registration Entries (.reg) file that contains the registry changes, and then run the .reg file on the computer where you want to make the changes. You can run the .reg file manually or by using a logon script. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

310516 (http://support.microsoft.com/kb/310516/) How to add, modify, or delete registry subkeys and values by using a Registration Entries (.reg) file

Use Windows Script Host

The Windows Script Host lets you run VBScript and JScript scripts directly in the operating system. You can create VBScript and JScript files that use Windows Script Host methods to delete, to read, and to write registry keys and values. For more information about these methods, visit the following Microsoft Web sites:


RegDelete method

http://msdn2.microsoft.com/en-us/library/293bt9hh.aspxp (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 (http://msdn2.microsoft.com/en-us/library/yfdfhz1b)

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. You can use WMI in scripting languages that have an engine on Windows and that handle Microsoft ActiveX objects. You can also use the WMI Command-Line utility (Wmic.exe) to modify the Windows registry.

For more 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)

For more information about the WMI Command-Line utility, click the following article number to view the article in the Microsoft Knowledge Base:

290216 (http://support.microsoft.com/kb/290216/) A description of the Windows Management Instrumentation (WMI) command-line utility (Wmic.exe)

Use Console Registry Tool for Windows

You can use the Console Registry Tool for Windows (Reg.exe) to edit the registry. For help with the Reg.exe tool, type reg /? at the Command Prompt, and then click OK.


Restore the registry

To restore the registry, use the appropriate method.


Restore the registry keys

To restore registry subkeys that you exported, double-click the Registration Entries (.reg) file that you saved in the Export registry subkeys section. Or, you can restore the whole registry from a backup. For more information about how to restore the whole registry, see the “Restore the whole registry” section later in this article.


Restore the whole registry

To restore the whole registry, restore the system state from a backup. For more information about how to restore the system state from a backup, click the following article number to view the article in the Microsoft Knowledge Base:

309340 (http://support.microsoft.com/kb/309340/) How to use Backup to restore files and folders on your computer in Windows XP


Note Backing up the system state also creates updated copies of the registry files in the %SystemRoot%\Repair folder. If you cannot start Windows XP after you edit the registry, you can replace the registry files manually by using the steps in the "Part One" section of the following Microsoft Knowledge Base article:

307545 (http://support.microsoft.com/kb/307545/) How to recover from a corrupted registry that prevents Windows XP from starting.

                                                                                            [HOME]   [SITE MAP]