Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Forums > Tutorials

Vista - Registry - Backup and Restore

Comment
 

Registry - Backup and Restore

How to Backup and Restore the Vista Registry
Published by Brink
02-22-2009

How to Backup and Restore the Vista 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 Vista. 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.
RELATED LINKS:

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 Vista and not just the registry.
1. Create a restore point.
NOTE: See information at that link for more details on this.
Method Two:
Export All of the Registry as a Backup
NOTE
  This will allow you to export all of the current registry to a .reg file as a backup.
1. Open the Start menu and type regedit in the search line, then press Enter.

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

3. Click on File on the menu bar, then click on Export. (See screenshot below)
export.jpg
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)
export_vista.jpg
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.

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

3. To Export a Registry HKEY Branch -
NOTE: This will allow you to backup the entire selected HKEY branch with all of it's subkeys 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)
export-2.jpg
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)
Click image for larger version

Name:	Export_Vista.jpg
Views:	50
Size:	110.7 KB
ID:	10331
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)
export_key.jpg
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 Vista by restoring the registry and system files in Vista 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 Vista 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. Since there will be registry entries in use, you have to restore it from outside Vista using a method like below.
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 Vista 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 5)

3. In the command prompt, type list volume and press Enter.
NOTE: Make note of what the drive letter is for your Vista drive or partition. If you have more than one OS installed other than Vista, then Vista may not be listed as the C: drive. (See screenshot below step 5)

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

5. In the command prompt, type the drive letter followed by a colon for the drive letter that Vista is installed on and press Enter.
NOTE: For example, it shows my Vista hard drive as the C: drive from the results in step 3, so I would type C: and press enter.

6. In the same command prompt, type regedit /s (full path to saved .reg file) and press Enter. (See screenshot below)
NOTE: I saved my Registry Backup.reg file to my desktop, so I would type:
regedit /s C:\Users\User-Name\Desktop\Registry Backup.reg
and press Enter. Your file path will vary of course.
command.jpg
7. 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)
import-2.jpg
B) Click on Yes and Yes to approve the merge.

C) Go to step 3.
2. Import from Regedit -
A) Open the Start menu and type regedit in the search line, then press Enter.

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

C) Click on File on the menu bar, then click on Import. (See screenshot below)
import.jpg
D) Navigate to where you saved the backup .reg file and select it, then click on the Save button. (See screenshot below)
import_vista.jpg
E) You will now see the import progress window. (See screenshot below)
Name:  Import_Progress.jpg
Views: 3424
Size:  28.4 KB
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.

error.jpg

That's it,
Shawn

Published by
Brink's Avatar
Administrator

Join Date: Apr 2007
Location: Texas, USA
Posts: 25,924
Rep Power: 150
Brink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond repute

Tutorial Tools

Applies to
All Vista Versions
64 Bit & 32 Bit

Old 04-28-2009  
pilotshorvath


Vista Home Premium 32bit
 
 

Re: Registry - Backup and Restore

Shawn, Thanks, fantastic article.

I have one question though. First, the fact is that I have a full backup the registry using Option One, Method Two.

If restoring it using Option Two Method Two doesn't work (because the corrupted registry entry causing the bootfail hasn't been replaced by the back up), you say that to completely replace the registry with the backup you have to use system restore.

Is there a way to fully replace the registry with the back up reg file WITHOUT using the system restore?

I ask because I have dual boot with XP, which have been deleting my restore points and I don't have any, but I do have the saved .reg backup of the Vista registry when it was working, before it got corrupted.


System: Dual Boot, XP on C:, WORKING
Vista on F:, corrupt registry cause bootfail
spare HDD on E:, for files and cross transfer if req'd
I have a full .reg back up of my Vista registry, but no resotre points

Or I could also boot into XP and restore the Vista registry from the .reg backup if there was a way to do that.

I'm happy to replace the whole registry, becuase I have no idea which key is corrupt. (Occured during a failed file copy between hard drives)

Thanks heaps for your knowledge.

Simon

My System SpecsSystem Spec
Old 04-28-2009  
Brink


Vista x64 Ultimate SP2, Windows 7 Ultimate x64
 
 

Re: Registry - Backup and Restore

Hello Simon, and welcome to Vista Forums.

Well, for the future, this will show you how to stop XP from deleting the Vista restore points when XP is started.

System Restore Points - Stop XP Dual Boot Delete

Have you already tried Method Two to restore it yet? It operates outside of the OS since you are booting from the Vista installation DVD.

For a boot failure, you may need to run a startup repair instead for Vista.

Hope this helps,
Shawn
My System SpecsSystem Spec
Old 04-28-2009  
SIW2


VISTA HOME PREMIUM X64/ 7 x64 / 7x86
 
 

Re: Registry - Backup and Restore

Hi Simon,

In addition to Shawn's post, you could try selecting Last Known Good Configuration from the Vista Advanced Boot Options screen.

Advanced Boot Options

Arrow down to it and press enter.
My System SpecsSystem Spec
Old 05-03-2009  
pilotshorvath


Vista Home Premium 32bit
 
 

Re: Registry - Backup and Restore

Hello again,

I should clarify what I meant by boot failure:

Normal and Last Know Good Configurations initially show the green snake, but then go to BSOD. If i load safe mode, it crashes on crcdisk.sys.

I have all STOP codes, ntbtlog files if it helps.

I tried method three, and selected the .reg to import, and the progress bar went all the way across, but then it gave an error of "Cannot access the registry" which is different to the one mention in your article. Any ideas? After this, when I exit back to the command prompt, and type regedit, it says: "This application has failed to start because its side-by-side configuration is incorrect. Please see your application event log for details". What does this mean?

So I rebooted, and after Vista DVD booting into command prompt, I tried method two. It sort of paused after my regadit /s command, then returned to the command prompt. I rebooted and no luck. But Shawn, my question is where in these dos commands do you specify which hard drive we are asking it to fix the registry. After we check our drives with the diskpart and list volume commands, you simply say to write the regedit /s FILE.reg command. I have a dual boot system with three hard drives. How is does the computer know which registry on which hard drive to fix?? I can't see where we select or command this, just where see the list of our hard drives.

Please clarify this section of your article and command?


Thanks again,

Simon
My System SpecsSystem Spec
Old 05-03-2009  
Brink


Vista x64 Ultimate SP2, Windows 7 Ultimate x64
 
 

Re: Registry - Backup and Restore

Hello Simon,

I have updated that part of the instruction (Method Two in OPTION TWO) to show how to specify what drive to write to.

Quote:
5. In the command prompt, type the drive letter followed by a colon for the drive letter that Vista is installed on and press Enter.
NOTE: For example, it shows my Vista hard drive as the C: drive from the results in step 3, so I would type C: and press enter.
Hope this helps,
Shawn
My System SpecsSystem Spec
Comment

Tutorial Tools


Similar Threads
Tutorial Category
need to restore an IE certificate from a ghost backup or restore all certificates Vista security
Dual Boot Vista - XP backup restore losing restore points Vista General
best backup software for Vista Home Ultimate that will allow me toselect files and folders to backup and restore Vista performance & maintenance
Backup/Restore using Vista Backup not recognising 2nd SATA drive Vista performance & maintenance
Vista Backup & Restore - Restore problem (08x10000e4) Vista performance & maintenance


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd
Tutorial powered by GARS 2.1.8m ©2005-2006

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46