1

When I try to delete the folder named C:\Program Files\WindowsApps\FocusHomeInteractiveSA.APlagueTaleInnocence-Window_1.0.5.0_x64__4hny5m903y3g0 I get the error...

The file cannot be accessed by the system.

I tried to fix the issue by doing the following things with no joy. Nothing seems to be able to get rid of the folder! So from what I can tell there are no issues on the drive or with the system, I have full access to the folder and simply can't do anything with it! Does anyone have any ideas on what I can do to delete the folder?

1. I tried to delete it from Windows Explorer:

enter image description here

2. I tried to delete it from a command prompt:

C:\Program Files\WindowsApps>takeown /R /F FocusHomeInteractiveSA.APlagueTaleInnocence-Window_1.0.5.0_x64__4hny5m903y3g0

SUCCESS: The file (or folder): "C:\Program Files\WindowsApps\FocusHomeInteractiveSA.APlagueTaleInnocence-Window_1.0.5.0_x64__4hny5m903y3g0" now owned by user "DEIMOS\Arvo Bowen".

You do not have permissions to read the contents of directory "C:\Program Files\WindowsApps\FocusHomeInteractiveSA.APlagueTaleInnocence-Window_1.0.5.0_x64__4hny5m903y3g0".
Do you want to replace the directory permissions with permissions granting you
full control ("Y" for YES, "N" for NO or "C" to CANCEL)? y
C:\Program Files\WindowsApps>del FocusHomeInteractiveSA.APlagueTaleInnocence-Window_1.0.5.0_x64__4hny5m903y3g0
The file cannot be accessed by the system.

enter image description here

3. I tried to delete the folder in safe mode:

enter image description here

4. I ran SFC:

C:\Program Files\WindowsApps>sfc /scannow

Beginning system scan.  This process will take some time.

Beginning verification phase of system scan.
Verification 100% complete.

Windows Resource Protection did not find any integrity violations.

5. I ran DISM:

C:\Program Files\WindowsApps>DISM.exe /Online /Cleanup-image /Restorehealth

Deployment Image Servicing and Management tool
Version: 10.0.18362.1

Image Version: 10.0.18363.592

[==========================100.0%==========================] The restore operation completed successfully.
The operation completed successfully.

6. I ran chkdsk:

C:\WINDOWS\system32>chkdsk /F /R
Checking file system on C:
The type of the file system is NTFS.

A disk check has been scheduled.
Windows will now check the disk.                         

Stage 1: Examining basic file system structure ...
  469248 file records processed.                                                         
File verification completed.
  8590 large file records processed.                                    
  0 bad file records processed.                                      

Stage 2: Examining file name linkage ...
  639 reparse records processed.                                       
  636680 index entries processed.                                                        
Index verification completed.
  0 unindexed files scanned.                                         
  0 unindexed files recovered to lost and found.                     
  639 reparse records processed.                                       

Stage 3: Examining security descriptors ...
Cleaning up 36 unused index entries from index $SII of file 0x9.
Cleaning up 36 unused index entries from index $SDH of file 0x9.
Cleaning up 36 unused security descriptors.
Security descriptor verification completed.
  83717 data files processed.                                            
CHKDSK is verifying Usn Journal...
  37844000 USN bytes processed.                                                            
Usn Journal verification completed.

Stage 4: Looking for bad clusters in user file data ...
  469232 files processed.                                                                
File data verification completed.

Stage 5: Looking for bad, free clusters ...
  77041071 free clusters processed.                                                        
Free space verification is complete.

Windows has scanned the file system and found no problems.
No further action is required.

 975651056 KB total disk space.
 666648388 KB in 331524 files.
    228852 KB in 83718 indexes.
         0 KB in bad sectors.
    609532 KB in use by the system.
     65536 KB occupied by the log file.
 308164284 KB available on disk.

      4096 bytes in each allocation unit.
 243912764 total allocation units on disk.
  77041071 allocation units available on disk.

Internal Info:
00 29 07 00 15 56 06 00 09 3c 0c 00 00 00 00 00  .)...V...<......
bd 01 00 00 c2 00 00 00 00 00 00 00 00 00 00 00  ................

Windows has finished checking your disk.
Please wait while your computer restarts.

7. I ran EaseUS Partition Manager looking for issues:

(RED blocks are bad sectors) enter image description here

8. I also tried to use WSReset.exe:

This did not yield any new results. The folder could still not be deleted.

C:\Program Files\WindowsApps>WSReset.exe
C:\Program Files\WindowsApps>del FocusHomeInteractiveSA.APlagueTaleInnocence-Window_1.0.5.0_x64__4hny5m903y3g0
The file cannot be accessed by the system.

As of right now, no known solutions have been able to help me delete the bad folder in the WindowsApps folder.

Arvo Bowen
  • 486
  • 3
  • 9
  • 26
  • Taking ownership by itself is not enough to delete the folder. You also have to add yourself to the ACL, by default, Administrators and Users do not have the required permissions to delete a folder within WindowsApps. I have had success using WinZip to change the permissions on files contained within a folder contained within WindowsApps in the past. – Ramhound Jan 25 '20 at 06:05
  • 1
    Does this answer your question? [How can I free up space taken up by an incomplete Microsoft Store download?](https://superuser.com/questions/1495993/how-can-i-free-up-space-taken-up-by-an-incomplete-microsoft-store-download) – Ramhound Jan 25 '20 at 06:10
  • Does this answer your question? [Editing/Creating files in C:\Program Files\WindowsApps](https://superuser.com/questions/940693/editing-creating-files-in-c-program-files-windowsapps) – harrymc Jan 25 '20 at 07:57
  • @Ramhound the takeown.exe application, I ran in the example above also sets new default permissions (ACLs) as well. I have included an image on #2 to show you. ACLs and Permissions are NOT the issues here. This has to do with Windows not being able to read the folder at all. – Arvo Bowen Jan 25 '20 at 21:29
  • @ArvoBowen - Your hostility is unwarranted. Yes; **Your reaction to the downvotes is unwarranted.** Have you tried to navigate to the directory with WinZip ran as an Administrator and try to delete the contents of the directory? Having done exactly that I know it will work. Comments are not required to explain or justify a downvote. Most users would not agree with the explanation of a comment was required to issue a downvote. Hopefully, you will try my suggestion, instead of replying to this comment. – Ramhound Jan 25 '20 at 22:52
  • Hostility? Wow... I did nothing but state 100% pure facts. Downvotes because you don't know a solution is "unwarranted". `Hopefully, you will try my suggestion, instead of replying to this comment.` Why can't I do both? I have indeed tried your suggestion. Actually it wasn't your suggestion I tried but one from the comment made by @ManSamVampire in the question you suggested my question was similar to. He suggested 7z and I did try that. Same result as #2. I just got tired of updating a question that is getting downvoted for no reason. Personally, I'm just trying to help the community. – Arvo Bowen Jan 25 '20 at 23:08
  • @Arvo Bowen Have you tried this? Shut down Windows normally but while pressing the Shift button at the same time. Boot the computer with a Linux Live CD/DVD or USB. Navigate to the folder and DELETE it from there? Also, I have looked up the Error code, you might want to search for this in the Registry: __Error 0x80070780 is commonly caused by incorrectly configured system settings or irregular entries in the Windows registry....__ – vssher Jan 26 '20 at 01:48
  • @vssher Thanks for the advice. I'll give that a try next. – Arvo Bowen Jan 26 '20 at 01:52
  • @vssher I tried something similar (Hirens Boot CD - Windows 10 PE) and the folder was still not able to be touched by the file system. I even tried to ghost my drive (100% successful) and tried to delete the folder on the new drive. It had the SAME ISSUE as well! Since I had a backup of my drive, I just ended up hitting the nuke button and formatting the drive with a fresh Windows install. I don't think the registry would have anything to do with the file system though. That would only effect Windows when you boot into Windows (I tried deleting outside of Windows). – Arvo Bowen Jan 29 '20 at 00:30
  • @Avro Bowen , sometimes, though, the registry can lock the file, since you have tried it with Hiren's it must have been beyond repair. I have had instances like that, where I use the move command to rename it because it was too long of a filename. Also, I downloaded a webpage from Latimes, it had some type of file which kept logging on and Windows would not let me delete it also. I went through Linux and removed it offline. At least you have got to the bottom of it. _Nuke button_, I like that. – vssher Jan 29 '20 at 02:02
  • @ArvoBowen ... This should do it for you... the "**Commands and Batch Script**" section in particular. I've used it successfully for the old MS Edge UWP app... https://superuser.com/questions/1462176/two-files-will-not-delete-from-hdd/1462392#1462392 – Vomit IT - Chunky Mess Style Nov 20 '20 at 17:19

2 Answers2

1

You have to make sure that you also have full access on subfolders and files in the folder that you want to delete. You can try the following steps to take ownership of the folder, subfolders and files and then giving yourself full access to the folder, subfolders and files.

  • Go the the properties of the folder that you want to delete
  • Go to security
  • Click advanced
  • Click change near "Owner: "
  • Fill in your username and press OK
  • Check "Replace owner on subcontainers and objects"
  • Press OK on the advanced security settings
  • Press OK on the properties of the folder
  • Reopen the properties of the folder
  • Go to security
  • Click advanced
  • Click the add button
  • Click on select principal
  • Fill in your username and press OK
  • Tick "Full control"
  • Make sure it applies to This folder, subfolders and files
  • Press OK on the advanced security settings
  • Press OK on the properties of the folder

You should now be able to delete the folder.

Shifty
  • 376
  • 1
  • 4
  • 1
    I thought I left a comment on this a long time ago but I guess not. Just to leave a reason as to why I can't accept this as the answer I wanted to make sure it was clear that this is NOT a permissions/access issue. This has to do with an issue that is similar to a bad sector on a hard drive. Somehow Microsoft has locked down that folder and will not allow anything to change or even access it. The ONLY thing I could do so far to resolve this issue was to do a repair (removing all installed applications etc). I still have a ghosted drive (with the issue) of it to test other solutions though. – Arvo Bowen Feb 11 '20 at 14:32
1

This happened to me also...
And these are the steps which solved my problem, hope this works for you too:

  1. Click on the "OneDrive" icon which is on the right side of taskbar.
  2. Click on "Help and Settings"
  3. Click on "setting" option.
  4. A tab will appear on your screen. select "Account" over there.
  5. Then click on "unlink the PC" .
  6. A dialogue box will appear , click unlink account on there.
  7. After that go to "system disk(c:) > Users > rauna" (in your computer ,location might not be same ,keeping "rauna" is my choice)
  8. There you will find "OneDrive" folder, delete it and those all files will be deleted which were showing error while deleting....
  9. After that again signin to your OneDrive account, your all data will be recovered from there and you will have whole access to them...
  10. If icons of some app are white then open "Task Manager" -find "windows explorer". do right click on it and select "end task " option...
  11. After that click on "File Menu" which will be at the top of "Task Manager" tab.
  12. Click "Run new task" and then type "explorer.exe" ,check the box and click "ok" ,your work will be done and icons will start to appear.
zx485
  • 2,170
  • 11
  • 17
  • 24