Thursday, December 16, 2010

How to Backup and Restore the Windows 7 Registry




Information
This will show you a few options on how to export the registry as a .reg file backup, and how to import the .reg file to restore to the registry in Windows 7. You can select to backup and restore all or part of the registry.



Warning
Importing or merging the .reg file backup will only restore the keys and values that were in the backup. If you have added new keys and values since the .reg file backup was created, then these items will not be affected when you import or merge the backup to the registry. If you wanted to replace the registry completely with a backup, then System Restore (see Method One in OPTION ONE & TWO below) will allow you to do this instead.

OPTION ONE

Backup Registry


METHOD ONE

Using System Restore

NOTE: This is the best method to use since it will completely replace the current registry with the contents of the registry as it was on the date the restore point was created. However, using System Restore will also backup and restore all of the system files in Windows 7 and not just the registry.

1. Create a restore point.

NOTE:
See information at that link for more details on this.


METHOD TWO

Export COMPLETE Registry as a Backup

NOTE:
This will allow you to export complete current registry to a .reg file as a backup.

1. Open the Start menu and type regedit in the search line, then press Enter. (See screen shot below)



2. If prompted by UAC, click on Yes to approve.

3. Click on File on the menu bar, then click on Export. (See screen shot below)



4. Select where you want to save the exported .reg file to, select (dot) the All option under Export range, type in a name for the .reg file, and click on the Save button. (See screenshot below)




METHOD THREE

Export Only Part of the Registry as a Backup

NOTE:
This will allow you to only export a HKEY or key branch in the registry to a .reg file as a backup.

1. Open the Start menu and type regedit in the search line, then press Enter. (See screenshot below)



2. If prompted by UAC, click on Yes to approve.

3. To Export a Registry HKEY Branch -

NOTE:
This will allow you to back up the entire selected HKEY branch with all of its sub keys and key values to a .reg file as a backup.

A) Right click on a HKEY branch that you want to backup, and click on Export. (See screenshot below)



B) Select where you want to save the exported .reg file to, type in a name for the .reg file, and click on the Save button. (See screenshot below)



4. To Export a Registry KEY Branch -

NOTE:
This will allow you to backup the entire selected KEY branch under a HKEY with all of it's subkeys and key values to a .reg file as a backup.

A) Right click on a KEY branch under the HKEY that you want to backup, and click on Export. (See screenshot below)



B) Select where you want to save the exported .reg file to, type in a name for the .reg file, and click on the Save button. (See screenshot below step 3B)


OPTION TWO

Restore Registry


METHOD ONE
From a System Restore Point

NOTE: This will replace your current registry and system files in Windows 7 by restoring the registry and system files in Windows 7 back to how they were on the date the restore point (Option One, Method One) was created.
1. Do a System Restore using a restore point with the date you want to restore you Windows 7 registry and system files back to.
NOTE: See information at link for more details on this.




METHOD TWO
From a REG File to Restore All of the Registry

NOTE:  
This will allow you to replace and restore only the keys and values that were in the backup .reg file (Option One, Method Two) at the date it was created. Any added new keys and values since the .reg file backup was created will not be affected by the backup.

1. Using the System Recovery Options, select to boot into a Command Prompt.

NOTE:  
You will need to boot into a command prompt at boot to be able to restore the entire registry. You will not be able to from within Windows 7 since some of the registry keys will be in use with access denied.

2. In the command prompt, type diskpart and press Enter. (See screenshot below step 3)

3. In the command prompt, type list volume and press Enter.

NOTE:  
Make note of what the drive letter is for your Windows 7 drive or partition. Remember, if Windows 7 created a 200 MB system partition during installation, then Windows 7 will not be on the C: drive, but instead on the D: drive if Windows 7 is the only OS installed on your computer. (See screenshot below)



4. In the command prompt, type exit and press Enter. (See screenshot above)

5. In the same command prompt, type regedit /s "full path to saved .reg file" and press Enter. (See screenshot below)

NOTE:  
For example, I only have Windows 7 installed with the 200 MB system partition it created during installation. I saved my Registry Backup.reg file to my desktop on the D: drive (from step 3), so I would type:
regedit /s D:\Users\User-Name\Desktop\Registry Backup.reg
and press Enter. Your file path will vary of course.



6. Close the command prompt window, and restart the computer.



METHOD THREE
From a REG File to Restore Part of the Registry

NOTE: This will allow you to replace and restore only the keys and values that were in the backup .reg file (Option One, Method Three) at the date it was created. Any added new keys and values since the .reg file backup was created will not be affected by the backup.

1. Merge from the REG File -

A) Right click on the backup .reg file and click on Merge. (See screenshot below)



B) Click on Yes and Yes to approve the merge.

C) Go to step 3.

OR

2. Import from Regedit -

A) Open the Start menu and type regedit in the search line, then press Enter. (See screenshot below)



B) If prompted by UAC, click on Yes to approve.

C) Click on File on the menu bar, then click on Import. (See screenshot below)



D) Navigate to where you saved the backup .reg file and select it, then click on the Save button. (See screenshot below)



E) You will now see the import progress window. (See screenshot below)



3. Click on OK.

Tip
If you get the error below, then you will need to do OPTION TWO - Method Two instead to restore the backup .reg file since the keys in the backup are in use.



Related Posts Plugin for WordPress, Blogger...

Search This Blog

Followers

Twitter Delicious Facebook Digg Stumbleupon Favorites More