All sorts of glitches and bugs are not uncommon for Windows operating systems. Errors occur for various reasons, both software and hardware, they can be insignificant or directly affect the performance of the system. Almost all users have encountered the problem of deleting files and directories and they know that it is impossible to complete the procedure if the element is in use, is involved in a process at the current moment, or in the absence of access rights. So, with renaming, completing the process, using utilities for unlocking, shredders, obtaining rights or loading from an external drive such as LiveCD, the problem is usually solved. In this case, in case of the error “The folder is not empty” with the code 0x80070091, and these actions are not always effective. A crash often appears when using the operating system recovery function,for example, when trying to return to the created point or recreating it. Let’s take a closer look at what caused this problem and how you can deal with it.
Contents
Causes of Error 0x80070091
Correcting any failure aims to eliminate the source of its origin. So it is with the error “The folder is not empty”, which has the code 0x80070091. If the directory is occupied by some process, everything is simple here, you can delete it by freeing it from the task, including by rebooting the system. It’s another matter if the problem is of a more serious nature and is provided by damage to the file system of the hard drive, which can in turn be triggered by a number of factors, starting with update curves, unsuccessful installation / uninstallation of software or the presence of viruses, ending with a violation of integrity due to physical malfunctions of the hard drive. Considering the error “The folder is not empty”, we can distinguish two options for its manifestation – during the OS recovery process, when there are problems with the content and registration of applications in the Windows Apps catalog,or when trying to delete any folder. The failure notification can usually contain additional information.
In our case, the location of the problematic element is indicated here – the directory located in the Program Files – Windows Apps directory. It is in it that the data for restoring the operating system lives, and the remnants of previously installed versions of the system may also be contained. The problem of deleting a folder occurs for various reasons. For example, the object continues to be used by the current Windows, which means that the process must be completed to complete the operation, or the system is blocking access to Windows Apps. In addition, the failure was widespread after the KB 3213968 update (regular OS updates are famous for not such surprises). There will be several ways to fix error 0x80070091 due to the fact that the problem may be associated with various provoking factors. Since the exact cause of the failure is unknown,applying in turn each of the solution options, you can achieve the desired result.
Correcting the error
If you are trying to delete a folder while any applications are working on it, it is quite natural that a crash with error code 0x80070091 will appear. So, the processes must be completed and in the case when the software is still using the object, it is required to disable the running software, including in the background.
Booting the system in clean mode
Clean boot state is useful for troubleshooting problems with Windows. So, using this solution, you can choose a minimum of drivers and programs with which the operating system will boot, and then return to the recovery procedure. For a clean boot, do the following:
- Go to System Configuration (press Win + R and type msconfig in the Run console line).
- In the window that opens, in the “General” tab, select “Selective startup”, where the ability to start system services should be marked, while opposite the item “Load startup items” the mark should be removed.
- We go to the “Services” tab, where you should check the item “Do not display Microsoft services” at the bottom of the window.
- Click the “Disable all” button, confirm the action and boot into Windows clean boot mode.
We are trying to restore the system by returning it to the point created earlier. The mode is deactivated in the opposite way.
Rename a folder
This simple solution is to rename the Windows Apps system directory. To do this, we perform the following manipulations:
- We change the name of the Windows Apps folder, but first we need to get the rights to change the object. We launch the command line under the administrator account, where we enter the command TAKEOWN / F “C: Program Files WindowsApps” / R / D Y.
- We are waiting for the end of the process, it will take some time, after which we close the console.
- We pass to the explorer, where in the settings we enable the option of showing system elements (in the parameters it is necessary to check the item “Show hidden files, folders and disks”).
- Now, using the Unlocker tool (to perform manipulations, its portable version is enough), select the Windows Apps folder and click Rename, specify a new name, then click the Unlock All button.
The procedure allows you to rename the folder, which in some situations will help to cope with the failure and the next attempt to restore the OS is successful. Sometimes it is possible to achieve success in removing a directory from under the LiveCD, while if the file system contains errors, new problems are likely in the future, so we will work on a possible source of trouble.
Scan hard disk for errors
The system utility CHKDSK (Check Disk) allows you to scan the disk for errors, bad sectors and fix any detected faults. You can run the tool using the command line. It is necessary to open it as an administrator through the “Run” console, where in the field write the cmd command and press Ctrl + Shift + Enter. The same can be done by using the search from the Start menu, then in the results of the issuance you need to right-click on the name of the utility and select the desired option for downloading the tool. Let’s start the procedure:
- In the command line, opened as administrator, enter the command chkdsk C: / f / r.
- Instead of the value “C: /”, you must substitute the name of the drive where the system is located. The f value in the command means it will check for errors and fix them if they are found. The / r parameter is responsible for finding bad sectors and restoring their contents.
- At the next start of the system, the utility will start working (checking a non-system disk does not require a reboot), you will need to wait some time until the process is completed.
- In the final report, you will see the result of the check.
Often, this method solves the problem of the error 0x80070091, since if a file is written in a damaged area, there is no access to it. In order for the contents of the sectors to be read and, if necessary, deleted, it is necessary to restore the file system data.
Change point of return
It happens that it is impossible to return to a saved point solely due to the deletion of a particular directory. In this case, returning to an early point will solve the problem. Since many conflicts arise during the operation of the OS, they subsequently provoke various errors and bugs. We return the system to an earlier state, when such problems did not arise, using the standard Windows recovery functionality, and it is likely that error 0x80070091 will no longer bother you.
Opening Access to Windows Apps
Another option, how to delete a folder, if this is prevented by a failure with code 0x80070091, involves gaining access to a locked object, which will provide the ability to restore the system or delete files. We do the following:
- Go to Program Files and in the “View” tab of the explorer open “Options”.
- In the “Folder Options” window, go to the “View” tab, where in the block of additional parameters check “Show hidden files, folders and drives”.
- Now the Windows Apps folder will be displayed, right-click on it to go to the object’s properties, select the “Security” and “Advanced” sections.
- Click “Continue”, find the “Change” option, enter the administrator’s name at the bottom of the window and click to check the name, confirm the action. It is also necessary to note the item on the replacement of the owner.
- In the “Security” section of the folder properties, select the administrator by checking the “Full access” item.
Conclusion
After the performed manipulations, you will have full rights to change the Windows Apps folder, you can rename it (see above), restart the device and try to perform a system restore again. Error 0x80070091, although not critical, causes a lot of inconvenience, and the above methods are enough to fix the failure.