Find the Help You Need!


Google
 

Monday, April 28, 2008

Access Denied

So, I downloaded and installed Windows XP Service Pack (SP3) - or at least, I tried to install it. About half-way through, I got an "access denied" error, which is odd because I have an administrative account (the actual administrator account did the same thing). Thinking that this was related to my previous issue with registry permissions, I did some digging and found that this is likely due to various file system permissions problems. Along with this problem identification came an unlikely, but very simple fix: reset the permissions!

Here's how:

1. Download and install SubInACL

SubInACL is a command-line tool that enables administrators to obtain and change security information about files, registry keys, and services. It's a tiny download from Microsoft found here.

2. Create a new text file

Right-click the desktop, click on New > Text Document. Just take the default name, we'll name it in a second.

3. Put in the necessary batch file code

Open up the new text file in Notepad (just double-click it) and paste in the following:

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. Save the text document as "reset.cmd"

When you do Save As... on the document, remember to change the "Save as type" from "Text Documents.txt" to "All Files". That way, it will actually save as a batch file (.cmd) instead of a normal text file. Then just close Notepad and you're ready.

5. Run the reset.cmd batch file

Just double-click on it. If you did it right, you'll see a window pop up and it will start working through your registry and file system, applying administrator permissions on the items that should have had them already. That whole process takes a few minutes to a lot of minutes, depending on how fast your computer is, etc.

Once that's done, try installing SP3 (or SP2, or whatever you were trying to install) and at the very least, you shouldn't have any more "Access Denied" error!

Good luck!

No comments: