How Do I Get Permission to Delete the Windows Folder?

Orion K 10 Reputation points
2024-03-19T06:25:49.81+00:00

I have a an external hard drive that I had previously used as the main drive on a scrap laptop that lacked an internal drive. Now, I am trying to use the same hard drive as an additional drive on my daily driver laptop.

Windows will not let me delete the massive "Windows" folder leftover on this drive, I cannot use this drive to its full storage capacity thanks to this undeletable & useless folder.

I have tried using force delete in cmd, I have tried disabling TrustedInstaller, I have tried changing the permissions on the folder. Windows gives me a series of "permission required" errors for the majority of the files within this folder when I try to give myself user permission to delete it.

How can I override TrustedInstaller & get that storage space on my drive back? Is there a way to tell Windows' protect me from deleting system files system that this is only an external drive & the prevention is unnecessary?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,791 questions
Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
2,941 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jing Zhou 7,515 Reputation points Microsoft Vendor
    2024-03-19T09:27:32.1266667+00:00

    Hello,

    Thank you for posting in Q&A forum.

    We suggest that you try the following steps to overwrite TrustedInstaller and delete this Windows folder:

    Open the Command Prompt (CMD) to run as an administrator.

    Transfer the ownership of the folder to yourself using the command takeown/f<path_to_windows_folder>/r/d y.

    Use the command icacls<path_to_windows_folder>/grant administrators: F/t to give the administrator group full control permissions.

    Then try deleting the folder. If it still cannot be deleted, use the command rd/s/q<path_to_windows_folder>to forcibly delete the folder and its contents.

    These commands should allow you to overwrite TrustedInstaller and successfully delete the Windows folder.

    Hope this answer can help you well.

    Best regards,

    Jill Zhou


  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more

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.