How to delete a protected file?


  1. Posts : 542
    Win10 x64 Pro -2 desktops, 1 laptop
       #1

    How to delete a protected file?


    I recently used DISM to extract files from an ISO. This is on a laptop with a single disk so I extracted the stuff to a folder on my C: drive. I don't know if that was a mistake or not.

    Anyway, I found what I was looking for and now want to delete the folder. First I was told I needed permission from TrustedInstaller to do the delete. According to what I've read on the web, I needed to take ownership of the folder. OK, did that. But now when I try deleting the folder I'm told I need permission from myself to do the delete.
    Click image for larger version. 

Name:	image.png 
Views:	50 
Size:	18.4 KB 
ID:	242458
    I'd love to give the permission. I'm on speaking terms with myself and am willing to give permission, but how do I do it? Obviously, I've missed something.
      My ComputerSystem Spec

  2.    #2

    Easiest thing to do would be to boot into a Linux Live USB and do it from that.
      My ComputerSystem Spec

  3. Ztruker's Avatar
    Posts : 8,479
    Windows 10 Pro X64 1903 189362.439
       #3

    How did you take ownership of the folder?

    Take a look at this: How to Add Take Ownership to Context Menu in Windows 10
      My ComputersSystem Spec


  4. Posts : 542
    Win10 x64 Pro -2 desktops, 1 laptop
    Thread Starter
       #4

    NavyLCDR said: View Post
    Easiest thing to do would be to boot into a Linux Live USB and do it from that.
    Thanks for the suggestion. I booted a WinPE system rather that Linux and deleted the folder.

    Successful end result, but I'd still like to know how it could have been done from within Windows.

    Ztruker said: View Post
    How did you take ownership of the folder?
    Take a look at this: How to Add Take Ownership to Context Menu in Windows 10
    That would be the quickest way, but I don't learn anything from black box solutions.
      My ComputerSystem Spec

  5.    #5

    Use a program like Emco Move on Boot
    Download EMCO MoveOnBoot - MajorGeeks

    It will enable you to successfully rename, move or delete any locked file or folder at the next system restart.
    Just like using a boot disk, this achieves the result when the protection is not applied as the OS is not running.
      My ComputersSystem Spec

  6.    #6

    You can execute following commands:


    Code:
    takeown /f  lostfile
    Gives ownership to the current user.


    Code:
     icacls lostfile /grant administrators:F"  /f
    Grant full permission to Administrators group.
      My ComputerSystem Spec



  7. Posts : 542
    Win10 x64 Pro -2 desktops, 1 laptop
    Thread Starter
       #7

    Thanks. I'll give those a try the next time I run into this. (Now that I've deleted the offending folder I don't think I'll recreate it just to try the commands.)
      My ComputerSystem Spec


 

Related Threads
I don't see a physical switch on the drive to enable/ disable write protection. Depending on how I went about to solve this I either got the message Write Protected or Read Only. Generic SanDisk Ultra 32GB stick. It was formatted fat32 and I got the...
I have a folder which is locked via "Lock-A-FoLdeR" program. I would like to create a readme file (doc or txt) that when opened would unlock the folder and then permanently delete the folder and its contents. This is a folder I want to be deleted...
Hi there so I am trying to enable file sharing from my PC with my home network and I would prefer to have protected file sharing enabled so if you want to access the files on my computer you are prompted to login with a username and password. The...
How do I get trustedinstaller Privledges.
Last night I wiped out my ASUS T100 tablet to clean install TH2. But there is a 7GB Recovery partition from Windows 8.1 that I can't get rid off using Diskpart. Can someone please assist me? 47974
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 20:45.
Find Us