Recently I moved a hard drive from an older PC to a newer one. I attempted to delete the Windows and Program Files directories and was given this unfriendly message:
Folder Access Denied
Clicking continue fails with a message abut requiring permission from TrustedInstaller.
No need to Try Again, it won’t work.
To fix this dilemma one needs to edit the properties of the folder twice. Once to obtain ownership and secondarily to set full control permissions.
Start with right clicking on the folder from explorer and selecting properties:
and on the security tab click Advanced near the bottom.
Switch to the Owner tab and click Edit…
Highlight your user account in the Change owner to: section and click on Replace owner on subcontainers and objects as shown below:
Click Apply and wait for the Windows Security dialog changing ownership of to finish. Once finished you will be presented with this dialog:
Click OK and OK and OK and OK (4 times) to close out of the properties windows.
Next, right click on the folder again; select properties again; go to the security tab again and click Advanced again (like in the instructions above).
From the Permissions tab (shown below), click on Change Permissions…
Next is displayed the Advanced Security Settings dialog:
Click on Add… and fill out the Enter the object name to selected:
In the next dialog (Permission Entry) check Full control “Allow” as shown below. And you don’t want to check “Apply these permissions to objects and/or containers within this container only”.
After returning to the prior dialog and before clicking on Apply, make sure “Replace all child object permissions with inheritable permissions from this object” is checked as indicated below:
The last step is to click Apply and agree to the following warning:
With the changes applied, you can click OK, OK, OK to close out of the open dialogs.
And now the folder can now be deleted.