How to force delete directory that isn't responding to ownership/permission changes?

W G 0 Reputation points
2024-06-24T22:30:08.13+00:00

I am having trouble deleting a directory in my 'Program Files' folder. even after manually editing permissions and ownership in the context menus and trying to use 'takeown and icacls' in an admin command console, nothing I do will allow me to delete the directory. Even when the ownership is registered to users. Trying to delete will result in a "you require permission from Users to delete this folder" message.

How can I delete this folder?

Windows for business Windows Client for IT Pros User experience Other
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Marcin Policht 49,640 Reputation points MVP Volunteer Moderator
    2024-06-24T23:57:04.0666667+00:00

    Boot Windows 10 from USB drive and then delete the directory on the fixed drive

    Details at https://www.digitaltrends.com/computing/how-to-boot-windows-10-from-usb/


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

  2. S.Sengupta 24,476 Reputation points MVP
    2024-06-25T00:14:12.0966667+00:00

    Boot into Safe mode and try to delete it.

    ===========

    1. Open Command Prompt as administrator
    2. Navigate to the parent directory
    3. Try: rd /s /q "FolderName"
    4. If that fails: del /f /s /q "FolderName\*.*"
    0 comments No comments

  3. Anonymous
    2024-06-26T03:41:04.0433333+00:00

    Hi WG,

    Thanks for your post. Before moving on, it is recommended to  uninstall programs from Start / Control Panel / Programs and Features - then select the program you want to delete, right click on it and click on uninstall or delete - otherwise pieces of the program stay in various places throughout the operating system and in the registry - there to cause you problems later on and taking up space for no good reason. If you just want to delete this folder, you can take ownership of the folder and then delete them. Step 1: Right click the folder, click on properties, go to the security tab and click on Advanced and then click on the Owner tab. 

    Step 2: Click edit and then click the name of the person you want to give ownership to (you may need to add it if it isn't there - or it may be yourself). If you want it to apply to sub-folders and files within that folder, then check the box for replace owner on subcontainers and objects and click OK. 

    Step 3: Back out and now there's a new owner for the folders and files who can change permissions as needed.  You can now change them from read-only (even if the main folder says they still are read only - you can have access yourself as the owner).  You can now delete the files and folders.  Here's more information on taking ownership of a file or folder: http://www.vistax64.com/tutorials/67717-take-ownership-file.html.

    If taking ownership doesn't work, then someone has placed a deny access to the Everyone user somewhere in security - you need to find that entry and delete it and then you'll be able to delete the files and folders.

    Best Regards,

    Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.