New
#1
Run CMD as admin and copy/paste:
Code:takeown /s %computername% /u %username% /f "D:\Program Files" /r /d y icacls "D:\Program Files" /inheritance:r icacls "D:\Program Files" /grant:r %username%:(OI)(CI)F /t /l /q /c rd "D:\Program Files" /s /q takeown /s %computername% /u %username% /f "D:\WindowsApps" /r /d y icacls "D:\WindowsApps" /inheritance:r icacls "D:\WindowsApps" /grant:r %username%:(OI)(CI)F /t /l /q /c rd "D:\WindowsApps" /s /q
There's nothing too hard about deleting 'undeletable' files- and you don't need to learn commands to do it.
So, once again...
1. Delete them without Windows running- offline.
E.g. from a bootable disk.
2. Within Windows (or outside it - offline)
You could 'take ownership' - see the searchable tutorial section.
3. Do yourself a favour- get a copy of Emco Unlockit (free).
UnLock IT Free - Unlock a File or Folder Locked by the System
This deals with all of the above, and with locking processes.
Should it be necessary, the move/copy/deletion is scheduled to be done when the PC reboots. (I.e. when Windows isn't running).
Last edited by dalchina; 3 Weeks Ago at 06:53.
Did you have this drive connected/partition active when Windows was installed? Window has a propensity to add system files to any extraneous drive (or non-system partition, even) during installation.
What you'll have to be prepared for is that the system may fail if certain system files are deleted
As others have said, it is relatively easy to delete such folders and files.
But before you do so take a moment to find out how they got there. Being owned by TrustedInstaller they look like they were created legitimately, even if unintentionally. What apps or programs do they contain? You may want to consider uninstalling them first, so you could then reinstall to C: drive after cleaning up.
As long as it is not sure that you can't delete the folders without any risk, you can hide them:
C:\Windows\System32>attrib +H "D:\......"
Because there were so many replies provided, I chose to go through them one by one in order.
I first ran the solution @TairikuOkami with the command line.
And the above screenshot is the result of directly copying and pasting the code into the command line.
Running it as administrator.
Because I'm not exactly a computwiz, I don't know much about all these terms and such.
I'm someone who is trying to fix as much of his computerproblems himself as he possibly can do.
Since my experience with someone hiring to do it for me.
Haven't been the greatest.
So excuse me when I might need some more explanation or help before I get it.
Because it isn't something I'm doing on a daily basis.
What should I do next?
If you want to delete them- and you're happy to do that- you have everything you need in the replies above and more.
Just choose one method.
There is still he unknown quantity that these may be critical system files, and the system may fail if they're deleted
If it were me, I'd ....
1) create a full image (Macrium Reflect and/or AOMEI Backupper) of the systems drive/partitions (i.e. all EXCEPT the partition/drive on which the subject/errant system files are contained)
2) remove/disconnect ALL drives
3) insert a blank drive and restore the image
If the system starts normally, then the subject/errant files are irrelevant and can be deleted safely as per above suggestion(s)
EDIT In any case, I'd be looking at doing an image/images anyway
EDIT 2 Still not clear - is the D: Data a separate drive or a partition on the same drive a C: ?