How to fix STATUS_WAIT_2 0x80070002 during System Restore in Windows 10

Any version of Windows comes with a pre-installed System Restore feature that allows you to return it to a previous state, provided that the option to create restore points is enabled. This tool creates OS backups for cases where performance issues occur. But sometimes the process may be interrupted by the message “Unexpected error occurred while restoring system (0x80070091).”

In many cases, it occurs due to problems with the WindowsApps folder. In this case, the error code 0x80070091 indicates that the destination folder is not empty. Also, recovery may be stopped due to blocking by antivirus or synchronization settings.

The usual solution would be to simply remove or rename WindowsApps, but it can only be accessed through TrustedInstaller. To solve the problem, first disable the antivirus, thereby eliminating its interference in the recovery process. If this approach does not work, then we will try to access the WindowsApps folder and rename it.

Uninstalling an antivirus

Before you try other solutions, try uninstalling your antivirus program. As you know, antivirus programs can interfere with the recovery process and block it.

Although the antivirus can be uninstalled in the “Uninstall or change programs” section, its residual files and registry entries can cause problems. Therefore, it is better to use the Revo Uninstaller utility, which will not only remove the application, but also clear all remaining files.

Go to the official website of the program and download the free version.

After installation, run Revo Uninstaller, find and mark the antivirus, then click on “Uninstall”.

Once uninstalled, select the Advanced checkbox and select Scan.

Wait until the scan is completed and residual files will be displayed. Select everything and click the Delete button. The next window will display a list of registry files, also select them all and delete them.

Then try restoring the system to its previous state. If you again encounter error 0x80070091, proceed to the next method.

Error: Cannot delete folder. The folder is not empty.

Previous Entry | Next Entry

aleksey_handle There was a computer on which a lot of managers had sat out and a bunch of no longer relevant profiles had accumulated on it, and when deleting one of the profiles in “Documents and Settings”, the error “Cannot delete folder . The folder is not empty." This way and that, and no way, this computer has been stuck with this error for more than a year, maybe more. Last week, I was tinkering with this computer and came across this bug again. In general, I was obsessed with figuring out how to delete this folder, and I spent 2 hours fiddling around with this computer. What was the bug that if you create another folder inside this folder, it is created, but when you go up a level, it disappears, becomes hidden, but not visible even when hidden and system files are enabled. What I tried: viewing startup, scanning for viruses, tinkering with folder permissions in different options, cleaned the computer with CCleaner, tried deleting in Total Commander, tried using the Unlocker utility, all to no avail. As a result, I spat, disconnected the hard drive and connected it to another computer, I thought that the operating system would not access this folder in any way and it would be possible to crash it. Fuck, even that didn’t work out. What helped: I ran a chkdsk disk scan. First close all programs. Select the drive and right-click on it. In the window that appears, select the “Service” tab, on this tab you will find the “Check Disk” button. If you selected drive C, then you need to restart your computer. After checking, your problem folder will take the form of an unknown file, which you can easily delete.__________________________________I searched through a bunch of different videos, forums and articles and put in my personal experience to find a solution. If my post helped you, you can buy me a beer)

Tags:

aleksey-handle.livejournal.com

Recovering the system from Windows Recovery Environment

Try restoring the previous OS state from the recovery environment. To do this, expand the Start menu, click on the power button and, while holding Shift, click on Restart.

The action selection window will open. Follow the path:

Troubleshooting – Advanced options – System recovery.

Specify a restore point and follow the onscreen instructions.

Rollback to a restore point

The last way to resolve the situation is to roll back the system to the first restore point:

  1. Open options and select menu "Update and Security»;

  2. On the "Recovery» click the button «Begin»;

  3. After starting the process and then rebooting the PC, the system will be returned to its original parameters.

How to fix the error - file is too large for the target file system

All methods for solving the problem of error 0x80070091 involve interfering with the root partitions of the hard drive, so some problems are possible during the further operation of the OS. You should weigh everything carefully before starting recovery.

Using Safe Mode

In safe mode, Windows boots with a minimal interface and the necessary programs. Thus, no third-party programs, including antiviruses, will interfere with system recovery.

To start Windows 10 in Safe Mode, follow the steps:

Hold down the Shift key and click the Reboot button to enter the recovery environment. Follow the path: Troubleshooting – Advanced options – Boot options. Press F4 to reboot your computer into Safe Mode.

After booting, try to roll back Windows to its previous state.

Open the recovery window with the command rstrui.exe launched from the Run window (Win + R).

Select the restore point you want to go to and in the next window click “Finish”.

Wait for the process to complete. If error 0x80070091 appears, move on to the next method.

Disabling unnecessary programs

Utilities that run in the background . They must be disabled by opening the Settings interface and selecting the Privacy ;

And turn off all background programs. It should be borne in mind that after restoring the system, if necessary, they will have to be turned on manually.

How to fix error code 0x8007007b

Renaming the WindowsApps folder from the command line

Error 0x80070091 can be resolved by deleting or renaming the WindowsApps folder. But this system folder cannot be accessed and therefore modified through this computer or in any other normal way. Therefore, let's try to access the folder using the command line.

Restart your computer in Safe Mode as described in the previous method.

Press Win + X together to open the context menu and select Command Prompt (Admin).

In the console, run the following commands one by one:

cd C:\Program Files takeown /f WindowsApps /r /d Y icacls WindowsApps /grant "%USERDOMAIN%\%USERNAME%":(F) /t attrib WindowsApps -h rename WindowsApps WindowsApps.old

  1. The first command allows you to go to the directory where the WindowsApps folder is located.
  2. The second command adds the current user as the owner of the folder.
  3. The third line gives full control over the folder so that it can be renamed.
  4. The fourth command removes the “hidden” attribute.
  5. The last command is to rename the folder to WindowsApps.old

Now try to restore the system. See if you were able to fix error 0x80070091.

Fixing the error

If you are trying to delete a folder while some applications are working with it, it is quite natural for a crash to appear with error code 0x80070091. Thus, the processes must be completed and in the case when the software is still using the object, it is necessary to disable the running software, including in the background.

Booting the system in clean mode

The clean boot state is useful when troubleshooting problems with Windows. So, using this solution, you can select the minimum drivers and programs with which the operating system will boot, and then return to the recovery procedure. To perform 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 option to start system services should be checked, while opposite the “Load startup items” checkbox should be unchecked.
  • We go to the “Services” tab, where it should be at the bottom of the window.
  • Click the “Disable all” button, confirm the action and boot into Windows clean boot mode.

We try to restore the system by returning it to the previously created point. The mode is deactivated in the reverse way.

Renaming a folder

This simple solution involves renaming 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 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 wait for the process to complete; this will take some time, after which we close the console.
  • Let's go to Explorer, where in the settings we enable the option to show system elements (you need o in the parameters).
  • Now, using the Unlocker tool (its portable version is enough to perform the manipulations), 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 cope with the failure and the next attempt to restore the OS will be successful. Sometimes it is possible to achieve success in deleting a directory from a LiveCD, but if the file system contains errors, new problems are likely in the future, so we will work on the possible source of the problem.

Scanning your hard drive for errors

The CHKDSK (Check Disk) system utility allows you to scan the disk for errors, bad sectors and eliminate detected faults. You can launch the tool using the command line. You need to open it with administrator rights using the “Run” console, where in the field enter the cmd command and press Ctrl+Shift+Enter. The same can be done by using the search from the Start menu, then in the search results 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 an administrator, enter the command chkdsk C: /f /r.
  • Instead of the value “C:/” you need to substitute the name of the disk where the system is located. The value of f in the command means to check for errors and correct them when found. The /r parameter is responsible for searching for damaged sectors and restoring their contents.
  • The next time the system starts, 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 error 0x80070091, since if a file is written to a damaged area, it cannot be accessed. In order for the contents of sectors to be read and, if necessary, deleted, it is necessary to perform file system data recovery.

Changing the return point

It happens that it is impossible to return to a saved point solely because a specific directory has been deleted. In this case, returning to the earlier 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 for deleting a folder, if failure with code 0x80070091 prevents this, 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 additional parameters block o.
  • 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 on name verification, confirm the action. It is also necessary to note the item on replacing the owner.
  • In the “Security” section of the folder properties, select the administrator, o.

Unexpected error during system recovery 0xc0000022: how to fix it using the simplest method?

So, we start from a disk or flash drive, after which, for example, in the case of a “native” Windows disk, we do not install the system, but move on to In principle, you can try to roll back the system from the corresponding partition, but, as practice shows, this is no good will not lead to this, and the message “Unexpected error during system recovery 0xc0000022” will appear again. It’s not surprising, because all the data about the rollback point and saved parameters is not on an optical or USB drive, but on the hard drive of a computer or laptop.

This is where the command line comes to the rescue. You can call it from the console menu or use the Shift + F10 keys. Now in the window that appears you need to enter the command sfc /scannow and press the enter key. Next, the verification process is activated, during which critical system components will be restored, including those responsible for the rollback.

Error classification

Apple support on a special page on the website divides failures by number into several categories. However, you will not find some codes. For example, there is no number 52 on the support page, because iTunes does not crash with such a code. Error 47 is also not listed, although some users complain that due to a glitch with this number they are unable to restore their iPhone.

If you encounter problem 47, there may be several reasons for its occurrence:

  1. Failure of the modem chip.
  2. Modem processor failure.
  3. Liquid has entered the modem part.

As you can see, error 47 is due to a hardware problem. Therefore, if you encounter failure 47 when restoring your iPhone, take your mobile device to a service center. Even the master does not immediately determine the exact cause

problem number 47 appears, so it’s better not to risk trying to repair it yourself.

Using a third party program

If you don't want to take extreme measures like resetting Windows components, try using third-party alternatives.

Keep in mind that Microsoft has stopped developing and supporting system recovery, backup, system image, and other utilities in Windows 10. It's possible that future releases of Windows will no longer include System Restore, as third-party equivalents are much better than the built-in solution.

If you're looking for a third-party program, consider one of these free alternatives:

  • Acronis True Image;
  • Clonezilla;
  • MiniTool Partition Wizard.

The utilities presented are either free or include a trial version.

Scanning your computer with an antivirus

Programs can be the culprit of various errors; if you recently installed a program and noticed this error after installing it, then remove it to check whether this problem is resolved. I also recommend checking the entire Windows system with a good virus scanner or antivirus .

The appearance of all kinds of failures and bugs is not uncommon for Windows operating systems. Errors occur for various reasons, both software and hardware, they can be minor or directly affect the performance of the system. Almost all users have encountered the problem of deleting files and directories and know that it is impossible to complete the procedure even if the element is in use, involved in some process at the moment, or if there are no access rights. So, with renaming, completing the process, using unlocking utilities, shredders, obtaining rights, or loading from an external drive such as LiveCD, the problem is usually solved. Moreover, in case of the “Folder is not empty” error with code 0x80070091, these actions are not always effective. A failure often appears when using the operating system restore function, for example, when trying to return to a created point or re-create it. Let's take a closer look at what causes this problem and how you can deal with it.

Fix error 0x80070091 when deleting a folder.

Specific methods for damaged boot record

If the previous method did not produce any results, most likely, the user is faced with the fact that the master boot record in the system is damaged. It will have to be restored.

We repeat all the download steps and get to the command line again. Here we write the following commands: first Bootrec.exe /FixMbr, and then Bootrec.exe /FixBoot. In most cases, no additional action is required. After they are successfully completed, as indicated by a message on the screen, you can try to restart the system again. In this case, if the recovery is not activated automatically, you need to reboot and call the safe mode menu, which uses the last known good configuration boot line.

If this does not work, repeat all the steps described above and add one more command to the two previous commands: Bootrec.exe /RebuildBcd (it overwrites the boot sector). After performing this operation, everything should definitely start without problems.

In what operating system does the error occur and how does it manifest itself?

This malfunction occurs in Windows 10. Its main symptom is the user’s inability to restore the system to a certain point. The problem is related to the "WindowsApps" directory , which stores system recovery files.

Another variant of the problem is related to the inability to delete a folder (any folder). In this case, the message looks like this: “Error 0x80070091: The folder is not empty .

Comments (6) 

How to change permissions without having admin rights?

How exactly to delegate authority (procedure of action)?

What is this “last, empty folder”?

Why post the document?! ))) just to check availability, i.e. just check if you have rights to the folder.

It would have been easier and more correct to immediately provide a link to a well-known article.

That's why I posted a link to an article that tells you step by step how to change access to the Windows.old folder

Rating
( 1 rating, average 4 out of 5 )
Did you like the article? Share with friends:
For any suggestions regarding the site: [email protected]
Для любых предложений по сайту: [email protected]