Wednesday, April 18, 2007

How to fix corrupted Registry keys in windows XP

I had a problem reinstalling Internet Explorer. Thus, I did the following as instructed by IE troubleshooting:
  • Start>Run, and type %windir%\ie7.log

I realised that several keys in HKEY_CLASSES_ROOT were corrupted, in the sense that I was unable to open nor delete the keys. This was problematic because IE7 installation need access to these keys.

But later I found this page, http://forum.aumha.org/viewtopic.php?t=8125 I followed the procedures and the problem was solved.

  1. Download and install subinacl from:

    http://www.microsoft.com/downloads/details.aspx?FamilyID=e8ba3e56-d8fe-4a91-93cf-ed6985e3927b&displaylang=en

  2. Create a file named reset.cmd (the "reset" can be any name you like) in C:\Program Files\Windows Resource
    Kits\Tools folder (the default folder for subinacl).

  3. Edit the reset.cmd file with the following content.

    subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f
    subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f
    subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f
    subinacl /subdirectories %SystemDrive% /grant=administrators=f

    subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=system=f
    subinacl /subkeyreg HKEY_CURRENT_USER /grant=system=f
    subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=system=f
    subinacl /subdirectories %SystemDrive% /grant=system=f

  4. Enter into CMD prompt by Start>Run, and type cmd.

  5. Enter the following commands one at a time and click Enter.

    cd\
    cd "C:\Program Files\Windows Resource Kits\Tools" (If you have installed subinacl in other folders, please enter the path of the folder where your subinacl installed instead.)
    reset.cmd
It took several minutes to process. I could see lines of the script being executed. After it was done, I reinstalled IE7. All the damaged keys were already unlocked!

1 comment:

Anonymous said...

Keep up the good work.