{"id":2344,"date":"2017-02-22T10:42:57","date_gmt":"2017-02-22T09:42:57","guid":{"rendered":"http:\/\/borncity.com\/win\/?p=2344"},"modified":"2024-10-05T23:22:57","modified_gmt":"2024-10-05T21:22:57","slug":"windows10-version-1607-system-restore-error-0x80070091","status":"publish","type":"post","link":"https:\/\/borncity.com\/win\/2017\/02\/22\/windows10-version-1607-system-restore-error-0x80070091\/","title":{"rendered":"Windows 10 Version 1607: System restore error 0x80070091 [Fix]"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" style=\"float: left; margin: 0px 10px 0px 0px; display: inline;\" src=\"http:\/\/www.borncity.com\/blog\/wp-content\/uploads\/2015\/01\/win102.jpg\" width=\"58\" height=\"58\" align=\"left\" \/>[<a href=\"http:\/\/www.borncity.com\/blog\/2017\/02\/20\/windows-10-version-1607-unbekannter-fehler-0x80070091\/\" target=\"_blank\" rel=\"noopener noreferrer\">German<\/a>]It seems that a couple of Windows 10 users are facing system restore error 0x80070091. I've blogged about that issue within my German blog, and it seems that my solution works. Here are a few hints for my English readers how to analyze and solve this issue.<\/p>\n<p><!--more--><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ssl-vg03.met.vgwort.de\/na\/9e32bde6eaac47bdbff8a5299ed1690d\" alt=\"\" width=\"1\" height=\"1\" \/>I found several forum posts from December 2016 and January 2017 mentions this error code (see <a href=\"https:\/\/www.windows10forums.com\/threads\/system-restore-error-0x80070091.12219\/page-2\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>, <a href=\"https:\/\/answers.microsoft.com\/en-us\/windows\/forum\/windows_10-update\/system-restore-failure-windows-10\/ae40aba3-1955-4e31-b82b-cc528ab811b5\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>, <a href=\"https:\/\/answers.microsoft.com\/en-us\/windows\/forum\/windows_10-update\/win-10-system-restore-fail-0x80070091\/7f690ec3-a3da-4c14-90fd-3eb0ba83f4ac\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>, <a href=\"https:\/\/answers.microsoft.com\/en-us\/windows\/forum\/windows_10-update\/system-restore-failure-windows-10\/ae40aba3-1955-4e31-b82b-cc528ab811b5\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>, here for Windows 10, and <a href=\"https:\/\/answers.microsoft.com\/en-us\/windows\/forum\/windows_8-update\/error-0x80070091-system-restore\/25030efd-a6a9-44c6-84cc-37196c340f64\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a> for Windows 8). But I came across this error the first time within a German <a href=\"https:\/\/answers.microsoft.com\/de-de\/windows\/forum\/windows_10-update\/unbekannter-fehler-bei-systemwiederherstellung\/3302642c-3e78-497b-8e3e-1873d724af94\">Microsoft Answers forum post<\/a>. A user describes the the error message as follows:<\/p>\n<blockquote><p>Version 1607 (Build 14986.1001)<br \/>\nI'm using system restore to create a restore point. Then I tried to revert back to this system restore point. After a while I got an error 0x80070091.<\/p>\n<p>System Restore did not complete successfully. Your computer's system files and settings wern not changed.<\/p>\n<p>Details: System Restore failed whil restoring the directory from the restore point.<br \/>\nSource:\u00a0 AppxStaging<br \/>\nDestination: %ProgramFiles%\\WindowsApps<\/p><\/blockquote>\n<p>So system restore failed with error 0x80070091 due to something broken in <em>AppxStaging<\/em>. Below is also a screenshot detailing this error.<\/p>\n<p><img decoding=\"async\" title=\"Fehlercode 0x80070091\" src=\"https:\/\/web.archive.org\/web\/20170621082800\/https:\/\/p33.imgup.net\/Error-0x808503.jpg\" alt=\"Fehlercode 0x80070091\" \/><\/p>\n<p>Error code 0x80070091 stands for ERROR_DIR_NOT_EMPTY (The directory isn't empty). Obviously something is broken in folder<\/p>\n<p><em>%ProgramFiles%\\WindowsApps<\/em><\/p>\n<p>so the <em>AppxStaging <\/em>function drops an error and refuse to rewrite the folder from system restore.<\/p>\n<h3>What's WindowsApps?<\/h3>\n<p>Windows 8 and later versions are using folder <em>%ProgramFiles%\\WindowsApps<\/em> to store preinstalled apps Also Windows 10 is using this folder to store preinstalled apps.<\/p>\n<p><img decoding=\"async\" title=\"WindowsApps\" src=\"https:\/\/web.archive.org\/web\/20170621095218\/https:\/\/i63.imgup.net\/WindowsAppc839.jpg\" alt=\"WindowsApps\" \/><\/p>\n<p>The screenshot shown above list the subfolders used to store apps. There are also folders named <em>Deleted <\/em>or <em>DeletedAllUserPackages<\/em> or <em>MovedPackages <\/em>containing also entries. I guess, something during deleting, updating or moving an app went wrong, and a folder isn't left empty. Then <em>AppxStaging <\/em>isn't able to restore the app folder from system restore and drops an error. Maybe third party tools like antivirus software is blocking, but I don't know for sure. The best, what we can do: Try to proceed the following steps \u2013 beginning with simple approaches.<\/p>\n<blockquote><p>Feedback from my German reader of this blog post <a href=\"http:\/\/www.borncity.com\/blog\/2017\/02\/20\/windows-10-version-1607-unbekannter-fehler-0x80070091\/\" target=\"_blank\" rel=\"noopener noreferrer\">Windows 10 Version 1607: Unbekannter Fehler 0x80070091<\/a> confirms, that some solution works.<\/p><\/blockquote>\n<h3>Addendum: How to list the WindowsApps folder as Administrator<\/h3>\n<p>Some user comments I received from my German <a href=\"http:\/\/www.borncity.com\/blog\/2017\/02\/20\/windows-10-version-1607-unbekannter-fehler-0x80070091\/\" target=\"_blank\" rel=\"noopener noreferrer\">blog post<\/a> are indicating, that the folder<\/p>\n<p><em>%ProgramFiles%\\WindowsApps<\/em><\/p>\n<p>contains some redirections (subfolders <em>VFS<\/em> with NTFS links) and could not be deleted. Virtual File System is used by App-V to redirect folders for instance. Perhaps something went wrong during updating apps. Robert Aldwinckle has suggested at Microsoft Answers forum a <a href=\"https:\/\/answers.microsoft.com\/en-us\/profile\/e70b95dc-9122-442a-b24a-22fb27ca636e\" target=\"_blank\" rel=\"noopener noreferrer\">solution<\/a> to list the folder's content without changing the permissions or tampering with TrustedInstaller rights. Here are the steps to proceed.<\/p>\n<ol>\n<li>Press Windows+X and select <em>Command prompt (Admin)<\/em>, and confirm UAC (see <a href=\"https:\/\/web.archive.org\/web\/20210512202711\/https:\/\/borncity.com\/win\/2016\/07\/06\/windows10-open-command-prompt-window-as-administrator\/\">Windows 10: Open command prompt window as administrator<\/a>).<\/li>\n<li>Enter <em>PowerShell<\/em> in command prompt window and press the enter key .<\/li>\n<li>If the PowerShell command prompt <em>PS C:\\WINDOWS\\system32&gt;<\/em> is visible, use the commands below.<\/li>\n<\/ol>\n<p>The command below changes the path to folder <em>WindowsApps<\/em>.<\/p>\n<p><em>cd $env:programfiles\\WindowsApps<\/em><\/p>\n<p>Then use the following command to enlist all sub-folders and its content via PowerShell and store the results within clipboard.<\/p>\n<p><em>(LS -Re -Fi * -Fo -Ea:Inquire).FullName | clip<\/em><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/web.archive.org\/web\/20170621091322\/https:\/\/a17.imgup.net\/PS-List-Foaa0e.jpg\" \/><\/p>\n<p>Then launch notepad using the PowerShell command <em>notepad <\/em>and insert the clipboard content pressing Strg+V. Afterward you can inspect all sub-folders within Windows editor. Search for <em>VFS <\/em>sub-folders for instance. My suspicion is, that some re-direction could be the cause for the system restore issue.<\/p>\n<h3>Fix #1: Try to remove third party tools and check your system<\/h3>\n<p>If a third party antivirus software causes this issue, the most simple approach is, to uninstall this AV software and use a vendor's clean tool to remove also files and settings remaining from uninstalling.<\/p>\n<p>Reboot Windows and check the system for damaged system components, using the advices given within my blog post <a href=\"https:\/\/borncity.com\/win\/2016\/07\/08\/check-and-repair-windows-system-files-and-component-store\/\">Check and repair Windows system files and component store<\/a>. Also try to do a disk check for Windows drive (right click Windows drive, select <em>Properties <\/em>and use the <em>Tools <\/em>tab to start a disk scan).<\/p>\n<h3>Fix #2: Try system restore from Windows PE<\/h3>\n<p>If third party tools blocks system restore, maybe it helps to execute system restore from Windows PE. Just click the On\/off button in start menu and select the <em>Restart <\/em>command while the <em>Shift<\/em> key has been pressed.<\/p>\n<p>If the <a href=\"https:\/\/msdn.microsoft.com\/de-de\/windows\/hardware\/commercialize\/manufacture\/desktop\/windows-recovery-environment--windows-re--technical-reference\">Windows PE<\/a> shows the page <em>Chose an option <\/em>click<em> <em>Troubleshoot <\/em><\/em>and go to <em><em>Advanced options <\/em><\/em>in the next page<em><em>.<\/em><\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/web.archive.org\/web\/20190203155839\/http:\/\/f00.imgup.net\/WinPE-Opticccd.jpg\" width=\"486\" height=\"400\" \/><\/p>\n<p>Within the <em>Advanced options <\/em>page select the <em>System Restore <\/em>tile and let Windows PE try to execute the system restore (see also <a href=\"https:\/\/borncity.com\/win\/2016\/09\/27\/windows-10-hangs-with-error-code-0xc0000034\/\">Windows 10 hangs with error code 0xc0000034<\/a> or <a href=\"https:\/\/borncity.com\/win\/2017\/01\/12\/windows-10-defender-offline-scan-boot-loop-part-2\/\">Windows 10: Defender Offline Scan boot loop \u2013 Part 2<\/a>).<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/web.archive.org\/web\/20190203155841\/http:\/\/b54.imgup.net\/WinPE-Adva89f9.jpg\" \/><\/p>\n<p>If it goes well, system restore is successful and your machine will revert to the selected restore point.<\/p>\n<blockquote><p>This approach has been discussed <a href=\"https:\/\/answers.microsoft.com\/en-us\/windows\/forum\/windows_10-update\/error-code-0x80070005\/81e4e422-5278-4431-8b09-7cf448c93ea7\">here<\/a> and within the <a href=\"https:\/\/neosmart.net\/wiki\/system-restore-did-not-complete-successfully\/\">neosmart.net Wiki<\/a> \u2013 but I fear, it won't help in many cases.<\/p>\n<p>I read also, that renaming folder <em>WindowsApps is possible within Windows PE (in command prompt window) without further hassle. The other solution is discussed below at <\/em>Fix #5.<\/p><\/blockquote>\n<h3>Fix #3: Synchronize Computer settings<\/h3>\n<p>There is another proposal how to fix system restore error 0x80070091 with synchronizing Windows settings. I found it within this <a href=\"https:\/\/answers.microsoft.com\/en-us\/windows\/forum\/windows_10-update\/system-restore-failed-while-restoring-the\/005bdbfa-75aa-4ad4-85d0-b427563e7928\">MS Answers forum post<\/a>.<\/p>\n<ol>\n<li>Go to <em>Settings<\/em> app (via start menu), click on <em>Accounts<\/em><\/li>\n<li>Select <em>Sync your settings<\/em><\/li>\n<li>Turn off <em>Sync settings<\/em><\/li>\n<\/ol>\n<p>Then reboot Windows and check whether system restore is back in operation again. But I fear, it won't help.<\/p>\n<h3>Fix #4: Uninstall Windows Apps<\/h3>\n<p>My idea was, to clean folder <em>%ProgramFiles%\\WindowsApps, <\/em>because it is named as a root cause. One attempt could be to go to <em>Settings<\/em>\u00a0 app, select <em>System \u2013 Apps &amp; Features <\/em>and try to uninstall all apps. But Windows 10 won't let you uninstall all pre-installed apps. So this attempt will fail.<\/p>\n<p>It's possible, to use the approach discussed within this <a href=\"http:\/\/superuser.com\/questions\/533170\/how-to-fully-uninstall-a-windows-store-app\">SuperUser thread<\/a>, and remove all apps via PowerShell. But that probably didn't help, if the app causing the system restore error has been partly removed. Maybe disk cleaning (via Windows drive's <em>property <\/em>page) helps, but I'm skeptical.<\/p>\n<h3>Fix #5: Rename\/clean WindowsApps folder<\/h3>\n<p>If you have proceeded the steps given above, and your are not successful at all, you run out of \"simple click solutions\". Then it's time for a more radical approach. We are going now to clean up the folder <em>%ProgramFiles%\\WindowsApps<\/em> that is causing trouble.<\/p>\n<blockquote><p>Warning: You are at your own risk, and accessing this protected folder is a bit tricky \u2013 but feedback from my German blog readers say it works.<\/p><\/blockquote>\n<p>The biggest problem is to access the folder <em>%ProgramFiles%\\WindowsApps<\/em>, because this folder is owned by TrustedInstaller and is protected in a special manner. So you are not even able to open this folder within Windows Explorer.<\/p>\n<p>You can try to obtain the ownership of this folder, following the advices given here <a href=\"https:\/\/www.maketecheasier.com\/access-windowsapps-folder-windows-10\/\">How to Get Access to WindowsApps Folder in Windows 10<\/a> or <a href=\"https:\/\/web.archive.org\/web\/20161211181254\/http:\/\/caioproiete.net:80\/en\/get-access-to-the-programfileswindowsapps-folder-and-view-apps-source-code\/\">here<\/a> or <a href=\"https:\/\/www.tenforums.com\/performance-maintenance\/68600-system-restore-fails-appxstaging-programfiles-windowsapp-0x80070091.html\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>. But I won't recommend this solution, due to the risk of unknown side effects \u2013 and because I have a more smart solution.<\/p>\n<p>This blog post <a href=\"http:\/\/www.softwareok.com\/?seite=faq-Windows-8&amp;faq=148\">How to clean up the app folder in Windows 8.1 and 10 (delete app\u00b4s)!<\/a> discusses how to use file manager Q-DIR to access the folder <em>%ProgramFiles%\\WindowsApps<\/em>. I've used another approach: I executed the third party file manager Explorer++ portable within the Trusted Installer's context. Trusted Intaller has full access rights to <em>%ProgramFiles%\\WindowsApps<\/em>.<\/p>\n<p>The steps, how to launch Explorer++ portable with Trusted Installer credentials has been discussed within my blog post <a href=\"https:\/\/borncity.com\/win\/2017\/02\/22\/windows-10-execute-programs-as-systemtrustedinstaller\/\">Windows 10: Execute programs as System\/ Trusted Installer<\/a>. Using this approach, enables me to create a copy of <em>WindowsApps<\/em>, inspect sub folders and subsequently delete entries.<\/p>\n<ol>\n<li>In a first approach just rename the folder <em>WindowsApps <\/em>to <em>WindowsApps.old<\/em>, using the approach outlined above.<\/li>\n<li>Then reboot your Windows 10 machine and try to execute system restore and let it restore a previous state.<\/li>\n<\/ol>\n<p>Some users of my German blog post confirmed, that this solution worked. One user mentioned, that some VFS subfolders contains NTFS links (for folder redirections) and couln't be deleted, but the <em>WindowsApps<\/em> folder was renameable. System restore set the machine to a previous state, and all apps are also back. If that didn't cure the isse, your are able, to re-rename <em>WindowsApps.old<\/em> back to <em>WindowsApps <\/em>and try other fixes.<\/p>\n<p>In case, you are not able to use process hacker and my solution above, or in case some files are locked, try to boot into\u00a0Windows PE (see Fix #2) and go to the command prompt windows. Then try to enter the following commands (press enter key to execute each command):<\/p>\n<p><em>cd 'C:\\Program Files'<br \/>\ntakeown \/f WindowsApps \/r \/d Y<br \/>\nicacls WindowsApps \/grant \"%USERDOMAIN%\\%USERNAME%\":(F) \/t<br \/>\nattrib WindowsApps -h<br \/>\nrename WindowsApps WindowsApps.old<\/em><\/p>\n<p>Note: I assumed, that logical drive C: is the Windows partition. Please check, if that's true &#8211; sometimes Windows drive is D: (tip: you can launch <em>notepad.exe<\/em> and select <em>File<\/em> &#8211; <em>Open<\/em> to use Open dialog as a mini file manager). Drive X: is wrong, because this is Windows PE running in a RAM disk.\u00a0I've added the attrib command due to\u00a0GregoryLivingston's <a href=\"https:\/\/answers.microsoft.com\/en-us\/windows\/forum\/windows_10-update\/win-10-system-restore-fail-0x80070091\/7f690ec3-a3da-4c14-90fd-3eb0ba83f4ac\" target=\"_blank\" rel=\"noopener noreferrer\">MS answers hint<\/a>, that rename fails, if the folder is hidden. If the rename command fails, or if you like to delete the folder, use the command:<\/p>\n<p><em>rd \/s WindowsApps<\/em><\/p>\n<p>The <em>rd<\/em> command deletes the WindowsApps folder with all sub folders. It's confirmed within\u00a0this\u00a0<a href=\"https:\/\/answers.microsoft.com\/en-us\/windows\/forum\/windows_10-update\/win-10-system-restore-fail-0x80070091\/7f690ec3-a3da-4c14-90fd-3eb0ba83f4ac\" target=\"_blank\" rel=\"noopener noreferrer\">forum post<\/a>, that the command sequence has\u00a0worked. Then close command prompt windows and try system restore again. It should work now (if not, try a reboot first).<\/p>\n<p>If fix #5 fails also, it's time to reset your Windows 10 to factory settings, using the <em>Settings <\/em>app. Hope, the hints given above helps to cure Windows 10 system restore error 0x80070091. Comments and further suggestions are welcome. If it worked for you, please let us know.<\/p>\n<p><strong>PostScript:<\/strong> There are indications, that the error could be related to January 2017 update for Windows 10. I've had a test machine with no other software installed, that fails with system restore error\u00a00x80070091. But uninstalling\u00a0<a href=\"https:\/\/support.microsoft.com\/en-us\/help\/4009938\/windows-10-update-kb3213986\" target=\"_blank\" rel=\"noopener noreferrer\">KB3213986<\/a>\u00a0won't cure this (see my comment within the [<a href=\"http:\/\/www.borncity.com\/blog\/2017\/02\/20\/windows-10-version-1607-unbekannter-fehler-0x80070091\/\" target=\"_blank\" rel=\"noopener noreferrer\">German<\/a>] blog post) &#8211; you need to process the instruction of fix #5.<\/p>\n<p><strong>Addendum:<\/strong>\u00a0Well, we have nailed it down to KB3213986\u00a0(see\u00a0<a href=\"https:\/\/borncity.com\/win\/2017\/03\/02\/windows-10-update-kb3213986-kills-system-restore\/\">Windows 10 Update KB3213986 kills system restore<\/a>).<\/p>\n<p><strong>Addendum 2:<\/strong> See my new findings here\u00a0<a href=\"https:\/\/borncity.com\/win\/2017\/04\/13\/windows-10-news-about-system-restore-error-0x80070091\/\" rel=\"bookmark\">Windows 10: News about System restore error 0x80070091<\/a>.<\/p>\n<p><strong>Similar articles:<br \/>\n<a href=\"https:\/\/borncity.com\/win\/win10-wiki\/\">Win10 Wiki<\/a><br \/>\n<\/strong><a href=\"https:\/\/borncity.com\/win\/2016\/11\/29\/windows-how-to-decode-update-0x8024-errors\/\">Windows: How to decode update 0x8024\u2026. errors<\/a><br \/>\n<a href=\"https:\/\/web.archive.org\/web\/20210512202711\/https:\/\/borncity.com\/win\/2016\/07\/06\/windows10-open-command-prompt-window-as-administrator\/\">Windows 10: Open command prompt window as administrator<\/a><br \/>\n<a href=\"https:\/\/borncity.com\/win\/2016\/07\/08\/check-and-repair-windows-system-files-and-component-store\/\">Check and repair Windows system files and component store<\/a><br \/>\n<a href=\"https:\/\/borncity.com\/win\/2017\/01\/10\/how-to-fix-windows-setup-hard-disk-locked-error\/\">How to fix Windows-Setup Hard Disk locked error<\/a><br \/>\n<a href=\"https:\/\/borncity.com\/win\/2017\/01\/12\/windows-10-defender-offline-scan-boot-loop-part-2\/\">Windows 10: Defender Offline Scan boot loop \u2013 Part 2<\/a><br \/>\n<a href=\"https:\/\/borncity.com\/win\/2017\/01\/03\/process-monitor-how-to-enable-windows-10-boot-logging\/\">Process Monitor: How to enable Windows 10 boot logging<\/a><br \/>\n<a href=\"https:\/\/borncity.com\/win\/2017\/02\/22\/windows-10-execute-programs-as-systemtrustedinstaller\/\">Windows 10: Execute programs as System\/TrustedInstaller<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>[German]It seems that a couple of Windows 10 users are facing system restore error 0x80070091. I've blogged about that issue within my German blog, and it seems that my solution works. Here are a few hints for my English readers &hellip; <a href=\"https:\/\/borncity.com\/win\/2017\/02\/22\/windows10-version-1607-system-restore-error-0x80070091\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[463,2],"tags":[680,618,76],"class_list":["post-2344","post","type-post","status-publish","format-standard","hentry","category-issue","category-windows","tag-error-0x80070091","tag-system-restore","tag-windows-10"],"_links":{"self":[{"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/posts\/2344","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/comments?post=2344"}],"version-history":[{"count":1,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/posts\/2344\/revisions"}],"predecessor-version":[{"id":36048,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/posts\/2344\/revisions\/36048"}],"wp:attachment":[{"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/media?parent=2344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/categories?post=2344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/tags?post=2344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}