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.)
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.
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.
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.
Copyright © 2008 Ramesh Srinivasan. All rights reserved.
RELATED POSTS
- Prevent Internet Explorer Toolbar Layout from being Reset
- Fix Search association settings in Vista
- How to Take Ownership of a file or folder using command-line in Windows Vista?
- Reset the Always ask before opening this type of file setting
- Fix for Application not found error when opening an URL
- How to change user account password at Command Prompt
- VBScript Files Open With Notepad
- Fixing Folder Type problems in Windows Vista
- Fix RSS feed update problems by resetting the feeds database in Internet Explorer 7
- How to Fix a Corrupted Recycle Bin in Windows Vista
BOOKMARK THIS PAGE
BlinkList | del.icio.us | Digg it | Furl | ma.gnolia | Newsvine | reddit | Spurl | Wink |



If you enjoyed this post, make sure you
Prefer an E-mail subscription?
Comment by Alex on 26 June 2008:
One small remark about the script: in my case after installing Subinacl.exe it was not added to the path, so I had to add it in the file reset.cmd. An alternative would be to change the PATH environment variable.
And most important - thanks for this article!
Comment by Walter on 24 July 2008:
Hey man. That did work!!!!! I solved a problem with flash activex control. Some of the users of my XP got cuouldn’t use de flash player. A message appeared asi it was not installed, but it was. And security settings in explorer were right. I tried sollutions from the flash site, but the only one which worked was this. secedit /configure /cfg %windir%\repair\secsetup.inf /db secsetup.sdb /verbose.
Thank you a lot.
Comment by Eugene on 31 July 2008:
Thank You!
This helped resolve the issue with permissions for jscript in the registry. I was unable to search. The search boxes were missing in Windows XP.
Comment by Mike V on 3 August 2008:
I have XP Home and the registry entry affected is the hkcr/imsiserver - which means I cannot reinstall Windows Installer - which is uninstalled, which means I cannot install any MSI installer, which means this little trick won’t work. What idiot decided to release a program named Subinacl.exe as an .msi file??? Alternatives? Is there an actual .exe version of Subinacl.exe? It’s impossible to search for because the .msi file download page is titled Subinacl.exe!!!
Comment by g on 9 August 2008:
hi Mike, I just uploaded Subinacl.exe in a zip file, hope it helps you out :)
http://rapidshare.com/files/135887597/Tools.zip.html
Comment by Linette on 9 August 2008:
Just what I’ve been searching for! However, you say not to apply these fixes (registry/permissions) unless absolutely necessary. Well, if I un-installed SP 3 because of it writing gibberish to my registry (yeah, probably because of a AV file– who knows?), and then, found a fix to repair what wasn’t working (viz., my Device Mgr. Display), and whilst I was doing that, messed around with the permissions on all the keys– but everything seems to be working now, and basically, the “admin.” and the “system” have full permissions… then do I need to apply this fix? Or, just wait until something goes wrong?
Maybe a dumb question, but I’m obsessed with this, now.
I have XP Home ed.
Thanks,
Comment by Joemomma on 21 August 2008:
You sir are the man! I was battling issues with the MSI installer in Vista launching every time I would right-click on a file. After doing some research I discovered that this problem was possibly stemming from registry ownership permissions. I read your article and ran the script and BAM!!! No more installer issues. Thank you sir, you’re a gentleman and a scholar.
Comment by Doug on 4 September 2008:
Thanks! This procedure fixed a problem for me as well. Thanks for posting it.
I was having problems registering a couple of .DLLs for application. I ran REGMON and found that these .DLLs could not access the keys HKCR\AKSHASP.*. These keys are used by Aladdin NetHASP security systems. For some reason I had no rights at all to these keys. Reseting all the permissions gave me the rights I needed to register the .DLLs and run the software
Comment by Kelly Walter on 8 September 2008:
Maybe someone can help. I tried to install Subinacl.exe via the directions above, but nothing happens. I saved the reset.cmd notepad with the information in it, but when I doubleclik the file, nothing happens except the notepad file just sits there open on my desktop. I removed Subinacl.exe and reinstalled it, when I went to run the program this time a black box (like if you do something in “run” appeared, then disappeared and still nothing happened. I am trying to correct a problem to be able to install Service Pack 3 on my XP, but what I’m getting ready to do right now, is throw this darn computer out a window. ;0)
Pingback by Cannot open registry key (error) « Deep thought on 19 September 2008:
[...] Tham khảo tại link: http://www.winhelponline.com/blog/reset-the-registry-and-the-file-permissions-in-windows-xp/ [...]