How to retrieve a registry key from a non-bootable drive in to the current hive?

I have a drive that crashed, non-bootable.  I can slave the drive and see the system files but I need certain registry keys, the environment key under the local Machine hive to be exact, from the non-bootable drive and inport it to the new registry.  OS is XP with sp1.
Who is Participating?
I would leave it in the PC and use this to take a look at the registry. It does much more than just reset passwords.
Tony GimenezInternshipCommented:
Why does it not boot?
What happens when you are trying to boot it?
This part is also very important,
What OS is it? Windows XP, 2000, NT, 98, etc..
Tony GimenezInternshipCommented:
Which registry keys do you need?

Also this may help.
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

They are the files with no extensions in the Windows\system32\config
folder, plus the individual users' ntuser.dat files in C:\documents and

Under Regedit, type load hive (as they are called hive files not registry files) in Regedit's help
Tony GimenezInternshipCommented:
REG SAVE KeyName FileName

  KeyName    ROOTKEY\SubKey
    SubKey   The full name of a registry key under the selected ROOTKEY
  FileName   The name of the disk file to save. If no path is specified, the
             file is created in the current folder of the calling process


  REG SAVE HKLM\Software\MyCo\MyApp
    Saves the hive MyApp to the file in the current folder

Maybe you can use the reg save command from the slave drive. I dont know if it will work but I guess its worth a try

open command prompt and browse to the slave drives windows\system32 folder

For example lets say the slave drives drive letter is E:\
Type this command:

cd E:\

Then type

cd windows\system32

Then type

reg save /?

and follow the instructions given

DOESN'T GET MUCH EASIER THAN THIS:      Alien Registry Viewer
It's a GUI registry editor for other registry files! :) Can view & extract ANY registry key.
30-day trial, enough time to fetch the keys you need at present.

Also, an older 6.80 release of the PWL tool for Win98 had the equivalent function: a REGEDIT.EXE file dated 4/3/1999 (with other files dated 6/23/2005) that works for the XP registry too. But the current 6.80 release still has a REGEDIT.EXE file dated 8/4/2004 (with other files dated 6/9/2006) that fails to launch in XP. Licence says "You may distribute copies of DEMO version of the SOFTWARE provided it remains in its original distribution form and all files and notices remain  intact." So I could possibly provide the older release that I have sitting around...

But the new Alien Registry Viewer is so much more featured & easier to use  now : )  A gem!
A further very usefull tool to use in these circumstances is the avast! boot cd. This CD contains a very good antivirus software with which you can check systems without booting them to their normal OS, you can download new definitions etc. This CD also includes registry editors which allow you to load the registry of the disks it has access to. It is a great "Toolbox" to have in many emergencies:

If you build a ubcd4win this also has similar tools on it and is free, but needs more time to make. Although the others may already have answered your Q, I regard these two CD's as the essential tools because they include many other usefull tools for recovering disaster, not only registry editors.
can this help you repair your registry ?
unless you can boot the drive to load the registry, you probably wont get it all.

However, you can do -- connect to remote registry in REGEDIT -- but the drive still needs to be running.  I doubt that remote registry can link to a static registry file group that is not loaded.

If you still have the hardware the drive ran on, clone the disk to another, and run it on that hardware, just to get the registry off -- registry - export - all registry, then name the file -- then you can import it.
Forgot: Final step:

-After you Export the registry key or hive from the other drive (whose registry you've opened without booting from that drive) using Alien Registry Viewer,
-You can take that exported file & import it into your current system (Start, Run, regedit --> File, Import)
Leave the drive in the computer, and use ERD Commander 2005 to boot your system, what this does is it will load OS from ERD Command 2005 CD, which you can access your registry once it's loaded.
As you noticed XP when it dies is very hard to fix since the problem is very hard to find. I am including the following comments because of my experience with xp and win98 becoming corrupt. Once my win 98 became corrupt and only a reformat was the answer. Well I had s many programs on it that it took three frustrating weeks to rebuild the HD. The same thing happened with XP SP1. Fortunately I did not at the time many programs on the HD.

What I did to avoid future problems reworking a HD is the following:

Purchase a slave HD that is larger than the C drive. This way one day you can use it as your C drive when your present C drive fails mechanically.

Download a 15 day trial of true image.
Install it on the C drive
It can be purchased at ½ price on:

Do a HD Copy to a slave drive. It should be at least as large as the C: drive. Preferable one that is larger than the C drive.

Download boot manager
Install it. When asked do an uninstall disk. It fails about once a year.
I found out that if it fails, it still boots up to the C drive.
Now with the boot manager menu, click on the slave HD.
It will boot.

Next I would make a 'database' folder.
Put all your data folders underneath it.
Do a copy and paste to the second drive.
Do this daily.
To be able to do an unintended copy and paste, first erase on the second drive the 'database' folder
Since you have file access to the slaved drive, navigate to the original OS folder then system32\config  you should see a file called SYSTEM with no file extension. Copy that to your local drive.

Go to Start, Run, and run REGEDT32. This version of regedit will allow you to load a hive. Go to File, Load Hive and browse to the file you copied from the old OS config folder. If the SYSTEM hive is not what you were looking for select one of the other Hive files (the ones without files extensions) I think they are SYSTEM, APPLICATION, DEFAULT, SAM, and SECURITY.

Hope this is what you were looking for.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.