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:

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

Related Posts


Email SubscriptionPrefer an E-mail subscription?

Enter your email address:

Delivered by FeedBurner

11 Comments

  1. Graeme Henderson
    said this on Monday, July 18th 2011 6:49 am

    I too join the chorus of praise for this simple but highly effective fix!

  2. devanir
    said this on Wednesday, June 29th 2011 8:55 pm

    this helps with
    media player
    internet explorer
    hp drivers
    codecs
    filters

  3. Neal
    said this on Sunday, June 26th 2011 8:53 am

    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

  4. danno
    said this on Tuesday, April 26th 2011 9:11 am

    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.

  5. Harshal Dekate
    said this on Monday, March 28th 2011 8:29 pm

    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.

  6. Steve
    said this on Thursday, December 30th 2010 10:42 am

    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

  7. Devvie Nuis
    said this on Thursday, October 28th 2010 5:15 pm

    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

  8. Justin
    said this on Wednesday, September 29th 2010 12:55 am

    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.

  9. Daniel-san
    said this on Wednesday, September 15th 2010 9:47 am

    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.

  10. Pete
    said this on Tuesday, July 13th 2010 12:48 am

    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!!!

Leave a Reply