There are countless errors and bugs that you may stumble across when using Windows 10, error code 0x80070091 being one of the least common but most annoying. Generally, there are two situations this error is triggered, the first being during the Windows System Restore process. The second being on odd occasions when trying to delete folders. Regardless of when and how you receive this error message, these are the steps you need to follow to fix it.
The Windows System Restore tool is an invaluable feature that can save you tons of time and heartache if you need to wind your system back to a previous state. Unfortunately, the System Restore feature can fail, often displaying error 0x80070091, for example, during a system restore, you will most likely see the following error message:
System Restore did not complete successfully. Your computer’s system files and settings were not changed.
Details: System Restore failed while restoring the directory from the restore point.
An unexpected error occurs during system restore. (0x80070091)
You may also see an error message like the one below when you are trying to delete folders from your computer:
Error 0x80070091: The directory is not empty.
Generally, you will see these error messages if there is a problem with your hard drive, so running a disk check should help fix the issue.
Fix Error 0x80070091 By Running the 'chkdsk' Command.
Now we have established that a possible cause for Error 0x80070091 is an issue with the disk, below is a method you can use to run a disk check which should resolve the error.
- First, Press Win + X and select Command Prompt (make sure to it run as Admin)
- Next, enter the following command into CMD: chkdsk /f /r C:
Note: If the folder is on a different disk drive, like D, E or F, You will need to replace C with that drive letter. For example, chkdsk /f /r D:)
- After executing this command, you may be asked to give it permission. To do this, press Y then press Enter.
- Once the check has completed, you should no longer receive error 0x80070091.
Boot Windows Into Safe Mode.
If the above method failed to fix the issue for you, you can try to delete the folder or perform a System Restore in Safe Mode. If you don’t know how to find Safe Mode on Windows 10, this guide will show you how: 5 Ways to Find the Advanced Startup Menu in Windows 10. If deleting the folder or performing a System Restore in Safe Mode still failed to fix the issue, you can try the final solution below.
Rename the 'WindowsApps' Folder to Fix Error 0x80070091.
If you encounter this error message: Destination: %ProgramFiles%\WindowsApps it means there is an issue with something in the C:\Program Files\WindowsApps directory stopping Windows system restore from completing. Deleting or renaming this folder will fix error 0x80070091, unfortunately deleting or renaming this folder is quite a process, so make sure you follow the steps closely.
- First, go to C:\Program Files. (If you have installed windows on another drive go to that location instead)
- Next, right-click on the WindowsApps folder select Properties (it may be hidden on your computer, so click on view at the top and tick the box to show hidden files)
- Go to the Security tab and click on Advanced.
- Now, click on Change (this will allow you to change the ownership of the folder)
- Type your username into the big box to the left of the grayed out Check Names box. Once you have entered your username correctly, click Check Names.
- Finally, click OK.
- Now, tick the box Replace owner on subcontainers and objects then click on Apply.
- It may take a moment to change the ownership.
- You should now be able to see your username or Microsoft account email address in permission entries.
- If it doesn’t show, click on Add, then click Select a principal.
- Search for your username and add it, like the above step.
- Next, from the Permission Entries, change your user permissions and give it full access.
- Then, boot your computer back into Safe Mode and go to C:\Program Files and rename the WindowsApps to WndowsApps.old.
That should have completely fixed error 0x80070091.