Reset the Registry and the File Permissions in Windows XP

You may need to reset the registry and file permissions if you experience Access is denied error when installing a Windows XP Service Pack or update. (Example: Service Pack 3 setup error. Access is denied.)

Hint: If you’re seeing the error Service Pack 3 setup error. Access is denied when installing Windows XP Service Pack 3, to verify if the error is caused by incorrect registry permissions, open the file C:\Windows\Svcpack.log using Notepad and look for the text Access is denied or DoRegistryUpdates failed.

Note: Access denied errors can also be caused by third-party applications, especially anti-virus or anti-spyware applications. So, make sure that you close all the anti-virus and anti-spyware utilities temporarily and then install the Service Pack. This helps in most cases. You should reset the registry and the file permissions only if necessary.

Resetting the Registry and the File Permissions

Using SECEDIT.EXE (for Windows XP Professional)

In Windows XP Professional, you may use the following secedit command-line to reset the file and registry permissions to defaults.

secedit /configure /cfg %windir%\repair\secsetup.inf /db secsetup.sdb /verbose

For more information, see article How to reset security settings back to the defaults.



Using SubInACL

For Windows XP Home Edition (and Professional Edition), you may use the SubInACL tool to reset the registry and file permissions. Download and then install the Subinacl.exe (~370 KB) from Microsoft. SubInACL is a command-line tool that enables administrators to obtain security information about files, registry keys, etc.

Download reset.zip, unzip and run the reset.cmd file. This script resets the registry and file permissions in your system.

Reset.cmd Contents

The file reset.cmd contains the following lines:


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

cd /d "%ProgramFiles%\Windows Resource Kits\Tools"
subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f
subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f
subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f
subinacl /subdirectories %SystemDrive%\ /grant=administrators=f /grant=system=f

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

15 thoughts on “Reset the Registry and the File Permissions in Windows XP”

  1. The worst thing is that all the messed up permissions are being caused by windows installer, this solution may work, but msiexec will mess everything again whenever you install a large program… too bad this is also a problem on windows 7 which, well, was designed to avoid this sort of ‘issues’. Solution: MS, fire all your crappy coders!!!

    Reply
  2. Totally helped me out with a XP SP2 box that 1) wouldn’t update with Windows update and 2) would not install SP3 without the Access Denied error. Now SP3 is installed and Win Updates are already downloading. Thanks a bunch.

    Reply
  3. The above solution for XP Home worked! Thanks so much! I was fixing a computer for my wife’s cousin. It had 300 or so files infected and after cleaning it, I was unable to run any windows updates. I have been trying to figure this out for 3 days.

    Reply
  4. Thank you very much; your solution repaired all the in-accessible hardware USB hives. I could not attach a new screen nor usb devices to this computer. Did not feel like a manual track-all-faulty-hw-id’s-and-fix-it-yourself solution. Yours worked like a charm!

    Peace!

    Devnullius

    Reply
  5. Thank You!

    You’re tip regarding reset.cmd has saved my wife’s computer after a virus attack. I was able to remove the virus, but after many attempts to install SP1 & SP3, I was stumped. Access denied every time. After I ran reset, the computer is now back to normal. Thank you so much.

    Steve

    Reply
  6. Thanks a lot. We had the issue with Group Policy. Domain Policy unable to perform any changes in some machines registry due to which our Policy was failed during changes in registry. This is permission issue.

    Now issue has beed fixed by using cmd “secedit /configure /cfg %windir%\repair\secsetup.inf /db secsetup.sdb /verbose”

    Thanks again for your article.

    Reply
  7. The SECEDIT fix will also correct the issue of PNG’s not displaying in IE7. It’s an issue of something (possibly Flash or Quicktime based on my own experience) breaking the permissions in the registry.

    Reply
  8. Just used this to also repair USB device access issues. No new device would install. Tried every other solution on the net. This one worked first time perfectly.

    Thanks
    Neal

    Reply
  9. Eureka! I wasn’t able to install my new Office 2007 because of registry key problems. Microsoft wouldn’t help. I couldn’t figure it out on my own. This fix worked. Thank you!

    Reply
  10. Thank you, this saved some crucial files for me. I botched my hard drive in a recover situation by changing the xp home Permissions on a win7 pc. Bad idea. You’re batch file was simple, easy to understand, yet effective. Thank you.

    Reply
  11. thank you so much! by pasting and copying your command line for windows xp pro, i was able (finally!) to download sp3 …thanks again

    Reply
  12. That moment in the movie Die Hard when the safe suddenly opens and Odes To Joy echoes from the sky is what it felt like to finally break through my week long nightmare. Thanks only to THIS! One of the engineers at MS apparently may have mistyped a key when trying to help someone in one of the help threads I tried it several times to no avail. I can complete my sytem repair THANKS TO YOU KIND SIR!

    Should anyone find themselves here after failure with attempting SubinACL using the guidelines from the below thread at microsoft answers…LOOK NO FURTHER… DOWNLOAD THE ABOVE ZIP and use it.
    Then take a bow to the author after your done. 🙂

    http://answers.microsoft.com/en-us/windows/forum/windows_7-security/how-to-reset-all-user-permissions-to-default/9da312d2-c99b-4283-a275-e74d93dcc366

    Reply
  13. If you have the win CD start the “new installation” up to moment when it asks for repairing and you will have the graphical interface. Then press SHIFT+F10 and start regedit and change the permissions you want.

    Reply

Leave a Comment