24

When deleting certain files from the Program Files directory using the Administrator account, I got the following pop-up:

Folder Access Denied

How should I work around this? Why am I asked to require permission from "TrustedInstaller", despite using an Administrator's account?

  • Are you trying to delete Windows.old ? – HackToHell Oct 31 '12 at 17:11
  • Trying to delete some files under "Program File", left after un unstallation of software. Windows.old is something left after upgrade to Windows 8 ? – A.Antri Oct 31 '12 at 17:15
  • There were some extension files that seemed a little delete resistant, but that was solved by cutting and moving the files to my Dropbox and then deleting them from there. I suppose there could be different variations of that type of maneuver. – user190133 Jan 21 '13 at 14:03
21

You need to take the ownership of this folder and recursive files:

Many times you need to take ownership of a file or folder in Windows. For example, when you want to customize Windows UI and need to replace existing system files with a new one. You have to follow no. of steps to take ownership and grant yourself full permission to access the file or folder. But now you can do it in a single step.

Basically, follow these steps:

  1. Enter into the folder properties:

enter image description here

  1. Go to "Security" and edit (with the Advanced button) the "CREATOR OWNER" owner to your user:

enter image description here enter image description here enter image description here enter image description here

Here you can also find a how-to video.

  • 1
    This did not help in my case where the Owner is showed in a link separated from Permissions, Auditing and Separate Permissions. And there was no clear way visible that could help me achieve the desired result. – MycrofD Jun 6 '15 at 16:41
  • @MycrofD This link might help you. Click on change in the owner tab, advanced in the next window, then find now and find your account. – Bprodz Jun 12 '15 at 19:11
  • If someone fancies to do the same from the command line, i.e. for batch automatization, here is (disclaimer: my) recipe: superuser.com/a/951764/75914 – Frank Nocke Sep 7 '15 at 10:22
22

http://cdn3.howtogeek.com/wp-content/uploads/TakeOwnership.zip

This requires a TakeOwnership registry hack. The files are in the link above.

In order to install the hack just execute the InstallTakeOwnership.reg file. Then restart the explorer.exe process. (You can do this in Task Manager) Now when you right click a file you should see an option to "Take Ownership".

Here is what it should look similar to:

enter image description here

4

TrustedInstaller is the built-in user account which Windows uses to install updates and Windows App.

The folder you're trying to open is owner by TrustedInstaller and no one else has read access. Being Administrator, you can change the permissions but only after you make yourself the owner.

If you're sure, you can become the owner and then delete the folder.

0

There are files that you cannot delete even if you have the TrustedInstaller rights (obtained via Joakim's RunAsTI console). Even as administrator you cannot set the owner of some directories and files.
With trurstedInstaller rights you can however move the directory around. But that too not to another drive.
The only way to nuke the directory is to move it within a folder that will later be deleted by TrustedInstaller.

WindowsApps is the right contender for this. When you delete the app the corresponding directory is also deleted by TrustedInstaller.

  1. Start a console with TrustedInstaller rights (you can user Joakim's RunAsTI
  2. Copy the directory name of the app you are about to delete. Begin installing an app if required from Windows store in order to create the directory if required. Then pause the download.
  3. Create a parent directory at the root of the drive. X:\<app_directory_name>
  4. Move the rogue directory to delete into this X:\<app_directory_name> directory
  5. Move the original also to the X:\<app_directory_name>
  6. Now move the X:\<app_directory_name> into the WindowsApps directory.
  7. Finally delete the app (cancel if download was midway) to nuke them all

protected by Community Jun 5 '13 at 20:52

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.