NEED HELP Win7's registry is corrupted

#1
Hello! Windows 7's registry was corrupted. I have a recent backup, but cannot access it because windows 7 crashes at startup. I tried using the repair command prompt to access it, but i am unable to. Could anybody tell me how to access your drive through the repair command prompt?
 


reghakr

Essential Member
#2
What is the exact error message you receive?

If you hit F8 (may be different for other manufacturer's computer), and get the the Repair screen which also has the Safe Mode, Safe Mode with Networking, etc.

If you choose Repair my computer, you'll have an option to do a system restore.
 


#3
Well, let's see. There is no error message because it BSOD's every time i start Windows 7. Safe Mode doesn't work, and System Restore doesn't work because "System Protection must be enabled on this disk".
 


reghakr

Essential Member
#4
Why is it that you believe the registry is corrupted?

Did you make any changes in the registry.

A BSOD almost always indicates a driver problem.

Have you recently updated any drivers?

Unfortunately it appears you may have turned off System Restore as the erro message indicates that "System protection must be enabled on the disk"

That's a bad situation.
 


#5
I am well aware of the fact that this is a bad situation. I believe the registry is corrupted because right before Windows 7 broke I used a Registry Defragmenter. I have not updated or changed any drivers. I did not turn off System Restore, but then again I didn't turn it on either. Is there any way to restore the registry at this stage? I am pretty sure that would fix the problem.
 


reghakr

Essential Member
#6
No, unfortunately there is no way to restore the entire registry even if you were able to get into Windows.

The registry is too large and binary formats do not import correctly.

I have never had any success with restoring the entire registry myself.

My only suggestion would be to perform a "clean" install, but note that you will have to re-install all your 3rd-party programs as there will be no pointers to this software in the rebuilt registry.
 


#7
Well, if that is the only option.... Also, I have restored the registry before. In fact it is very easy. If a program backs it up, it is saved as a .reg file, and once you click it Windows re-writes the registry with it.
 


reghakr

Essential Member
#8
Yes, the .reg file does work, but mainly for a single key and the values associated with it.

But when you try to import an entire registry, that's where the problem comes in.
 


#9
OK then, I guess I have to reinstall Windows 7. Well, at least I learned something. And that's to not use registry defragmenters on Windows 7.
 


reghakr

Essential Member
#10
Did you ever have a Blue screen error before performing the registry defrgmentation?
 


#11
I have experimented with a few reg defraggers/compactors on 7.

Some do not support 7 yet - as you discovered.

Auslogics Reg defrag worked fine when I tried it. I used the last free version v5.1

The reg defrag in PCTools Registry mechanic and Desktop Maestro v2 also worked fine.

If you are going to have fun experimenting - it is a good idea to make a back up image - not with Windows Backup, though.

( It is possible to restore the registry, but not very straightforward or reliable - much better to have a 3rd party backup program.)

The free Macrium Reflect is excellent - small and fast - and I have never had any problem restoring an image.

Macrium Reflect FREE Edition - Information and download
 


#12
Registry

Did you make a Windows 7 repair disk when you installed Windows 7? You should be able to repair the registry with this disk.

You may be able to still make the disk from your installation disk.
 


#13
Hi twincitybulldog,

If you have the 7 install dvd - all the system recovery options are on it - no need to make a separate repair disc.
 


#14
No, I haven't had BSOD before. Also, how would you repair the registry with the installation disc?
 


#15
Are you comfortable using the command prompt?
 


#16
Boot the dvd to system recovery options:

( Boot dvd - windows loads files - select language and keyboard -
when you get the Install Now screen , DO NOT CLICK "Install Now" ,
instead click "Repair my Computer" at the bottom left of that window ).

It will probably attempt an automatic repair - worth running that a couple of times to see if it helps.

If not, highlight the o/s to repair, click Next

Open the command prompt


Type the following - press enter after each command ( after each line):


cd windows\system32\config
ren default default.old
ren sam sam.old
ren security security.old
ren software software.old
ren system system.old
cd regback
copy default c:\windows\system32\config
copy sam c:\windows\system32\config
copy security c:\windows\system32\config
copy software c:\windows\system32\config
copy system c:\windows\system32\config

Close cmd prompt, restart - boot from HD. With any luck you will boot up fine.
 


#17
I sort of am.
 


#18
Before you attempt the registry repair in my previous post - worth checking you are working on the right partition - specially if you dual booting. Identify the 7 partition from the cmd prompt like this:

X:\sources>DISKPART

Microsoft DiskPart version 6.1.7137
Copyright (C) 1999-2008 Microsoft Corporation.
On computer: 7-PC

DISKPART> LIS VOL

Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- ------
Volume 0 F DVD-ROM 0 B No Media
Volume 1 C New Volume NTFS Partition 30 GB Healthy
Volume 2 D New Volume NTFS Partition 25 GB Healthy System
Volume 3 E 7000 x86 NTFS Partition 23 GB Healthy
Volume 4 G Data Logica NTFS Partition 40 GB Healthy
Volume 5 H Backup Logi NTFS Partition 30 GB Healthy

DISKPART> exi

Leaving DiskPart...


The first command will then be to cd ( change directory ) to the correct partition.
 


Last edited:
#19
After I did what you said, every time I start Windows 7 it goes directly to the repair program, which then fails to find the problem. Any help?
 


#20
When you replaced the registry with the backup copies from regbak using the command prompt - did you get messages saying it had completed successfully ?

If you did that and still can't get in - see if system restore now works from the dvd,.

Otherwise looks like a clean reinstall is on the cards.

If you have vital data you need to save - do not format the partition during the installation and everything wiil be saved into a folder called Windows.old.
 


This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.