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.)

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 in 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.

Open Notepad, copy the commands below and save the file as reset.cmd. Double-click the file to run it. This script file may take a long time to run. Registry and file permissions in your system should be reset.

cd /d “%ProgramFiles%\Windows Resource Kits\Tools”
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

Note: 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.

Bookmark this Page!

BlinkList | del.icio.us | Digg it | Furl | reddit | Spurl | StumbleUpon |

Related Posts


Email SubscriptionPrefer an E-mail subscription?

Enter your email address:

Delivered by FeedBurner

27 Responses to “Reset the Registry and the File Permissions in Windows XP” Subscribe to comments!

  1. Paul Messenger
    said this on Wednesday, January 21st 2009 6:31 pm

    Fantastic! Have been trying for weeks to load SP2 on XP Home edition and none of the MS support sites helped at all! Thanks.

  2. Shelton Keisling
    said this on Wednesday, December 31st 2008 7:20 pm

    I ran the reset script and it appeared to run correctly. However now I have no functional internet connection to my computer. Windows explorer apparently finds web pages, but I just get a white window (not the usual “web page is unavailable” message or whatever it normally says). I don’t believe I’ve ever seen that before. Also my email program cannot find a server now. My cable modem is functional (I have another computer with a wireless connection to the same router and the internet works fine on that one), so the reset somehow disabled something within this computer.

    BTW, I never could install SP3. And at the moment now, I’m not caring to much about that. I just want my internet back.

    Any ideas?

  3. J
    said this on Tuesday, December 23rd 2008 11:39 am

    KellyWalter make sure the subinacl.exe file is in windows/system32 dir before runing the script

  4. AH
    said this on Saturday, December 20th 2008 8:08 pm

    Methinks that you are in error, Subinacl.exe has not been designed to run on XP home.
    Have you any other suggestions?

  5. GD
    said this on Thursday, December 4th 2008 11:44 am

    Skillet….thanx for the effort..but what do we do once it runs…and mine just runs like for a sec and thats it…nothing at all after that…as u said, i saved it as all files, changed the first line…but just nothing…the cmd comes for a flash and then………NOTHING..just nothing..do i need to reboot, do i need to manually change the permissions in the registry and secondly is it regedit OR regedt32.exe that the effect will take place>>

    thanx and ramesh, u there or not??

  6. Gwcwc3po
    said this on Thursday, December 4th 2008 10:18 am

    Skillet Your my hero!

  7. Skillet
    said this on Wednesday, December 3rd 2008 8:34 pm

    After reading comments thought I’d add one to help….
    I had to change the first line of the copied reset.cmd file to

    cd\Program Files\Windows Resource Kits\Tools

    This is assuming you installed it on your C: drive (or OS drive)

    Also when you paste it in Notepad you must then click
    File
    Save As…
    Type reset.cmd in Filename box
    and change Save as Type dropdown box to “All Files”
    Believe me you will know when it runs…
    Thanks Ramesh and good luck to all who stop by…

  8. GD
    said this on Tuesday, December 2nd 2008 9:46 am

    Hey..ramesh..nothing happened….i ran the reset.cmd file….all it did was..just ran..thats it…the cmd window flashes for a sec..and thats about it..nothing after that…my registry is still the same…no GOOD…..do i need to restart???

  9. Day
    said this on Friday, November 14th 2008 2:15 am

    Nice fix. Worked like a charm once I added it to the Windows resource took folder. Thanks. You fixed a problem I have had with adobe flash player and IE7 for over a month.

  10. David Walker
    said this on Wednesday, October 22nd 2008 8:59 pm

    When you copy from the sample, and paste into a Command prompt, the double-quote characters are not quite right… so you have to copy the thing to a batch file, THEN edit the double-quote characters (replace them with double-quote characters, even though they look the same). I think there is a character translation issue or something.

    I kept getting the message “The filename, directory name, or volume label syntax is incorrect.”

    Otherwise, great tool.

Leave a Reply