Monday, August 16, 2010

Recover Corrupted User Registry Hive

4 comments
Everytime I start my computer, my folder settings and folder view reset itself to default. I set it back and do it everyday and after next reboot, it reset folder settings back to default again. After opening Events Viewer, I found out that my user registry corrupted in and registry recovery occured on each boot.

It says,
Event 5, Kernel-General:
{Registry Hive Recovered} Registry hive (file): '\??\C:\Users\<username>\ntuser.dat' was corrupted and it has been recovered. Some data might have been lost.



Folder settings is stored in user registry and perhaps thats the reason why my folder settings & folder view reset itself.

Today tutorial is how to Recover Corrupted User Registry Hive yourself so you wont lose any computer settings. It's possible only if you can still login with your profile. If you are not able to login to your profile or got message saying Your user profile was not loaded correctly! You have been logged on with a temporary profile, run checkdisk first.
  • First step is to create a new temporary blank account and name it temp and set it as Administrator. Then click Create Account
  • Then Logout your current account and Login with new temporary account. Wait until preparing is complete.
  • Second step. Open my computer or any folder, Click Organize\Folder and Search options.
  • Click view and
    • Select Show Hidden files, folders, or drive,
    • Untick Hide protected operating system files
  • After that, run Registry Editor as administrator. Type regedit.exe in search box and right-click Run As Administrator.
  • Click HKEY_LOCAL_MACHINE to select and highlight it (Not expand) and click Load Hive on File menu (File\Load Hive)
  • Browse to C:\Users\YourUsername\NTUSER.dat and name it as corrupt
  • Click corrupt (Not expand) and then File\Export... Save to desktop as corrupt.reg
  • Click File\Unload Hive.
  • Now logout from your temporary profile and login back into your corrupted profile.
  • Go to C:\Users\temp\ and copy NTUSER.DAT to C:\ (If you didn't see it, repeat second step)
  • Logout and login temp account, start regedit.exe again.
  • Click File\Load Hive and browse to C:\NTUSER.DAT (that you copied from your C:\Users\temp account) and name it as corrupt
  • Expand corrupt and delete everything under it, some entry cannot be deleted. You can fix it by changing permission or just leave it. I just leave it.
(Picture shows deleted registry child and some entry that cannot be deleted)
  • After everything is done, click corrupt.reg that you save earlier on desktop
  • Now click corrupt to highlight it and Click File\Unload Hive. Then close registry editor.
  • After that copy your C:\NTUSER.DAT to C:\Users\YourUserName\NTUSER.DAT and replace it.
  • You may find many other NTUSER.DAT* like ntuser.dat.LOG1, ntuser.dat.LOG2, NTUSER.DAT{GUID}.TxR.0.regtrans-ms, etc, you can delete that.
  • Login to your user account back.
  • After login to your account, open registry editor.
  • Right-Click at HKEY_CURRENT_USER, Permissions and Remove unknown group or username, then click add button
  • Click advanced and then click Find Now
  • Find your current username and click ok
  • Done

4 comments :

  1. Thanks much, a little confusing towards the end, couldn't copy the ntuser.dat file back, (file in use), but then again I really didn't need to.
    I tried to login to my corrupt account and it couldn't load my profile, logged in as temp, regeditm, think I forgot to delete the corrupt hive, anyway my profile is back. thanks again.

    ReplyDelete
  2. A good backup and good tools from you. This is the one of the best tutorial for corrupt user registry. I want to discus that is you have a recovery of External Hard Drive ?
    retrieve deleted emails

    ReplyDelete
  3. I wish there was a similar tutorial for WXP

    ReplyDelete
  4. We are provide online solution of your problem if any type of problem related of windows 7 then please check this site and fix your problem.
    Fix Windows 7 Error 1068
    Thank you
    Aalia lyon

    ReplyDelete