none
0x80070091 error during UDI RRS feed

  • Question

  • I'm seeing an issue when using UDI. It gets to the point where it downloads the OS and then starts to apply to D while in WinPE but can't delete a folder in Program Files to apply the image (curious why it even has a Program Files directory). Here's a series of the errors:

    Unable to delete directory D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe\VFS\ProgramFilesCommonX64 (0x80070091).  Continuing.	ApplyOperatingSystem	2/21/2017 9:21:27 AM	1500 (0x05DC)
    Unable to delete directory D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe\VFS\SystemX64 (0x80070091).  Continuing.	ApplyOperatingSystem	2/21/2017 9:21:27 AM	1500 (0x05DC)
    Unable to delete directory D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe\VFS (0x80070091).  Continuing.	ApplyOperatingSystem	2/21/2017 9:21:27 AM	1500 (0x05DC)
    Unable to delete directory D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe (0x80070091).  Continuing.	ApplyOperatingSystem	2/21/2017 9:21:27 AM	1500 (0x05DC)
    
    It tries to delete these folders several times but eventually fails with error 0x80070091. Why is it doing this?? :(

    Tuesday, February 21, 2017 3:21 PM

All replies

  • Not sure why it can't delete the Microsoft.MicrosoftOfficeHub directory. If I choose to wipe the drive and not do Offline USMT, it works, but not when trying to save user data and settings through offline USMT...
    Wednesday, February 22, 2017 5:35 PM
  • Here's more of the SMSTS.log

    Skipping D:\StateStore for wipe	ApplyOperatingSystem	2/22/2017 11:04:52 AM	1768 (0x06E8)
    Skipping D:\System Volume Information for wipe	ApplyOperatingSystem	2/22/2017 11:04:52 AM	1768 (0x06E8)
    Skipping D:\_SMSTaskSequence for wipe	ApplyOperatingSystem	2/22/2017 11:04:52 AM	1768 (0x06E8)
    Unable to delete directory 'D:\' (0x80070091). Retrying after delay.	ApplyOperatingSystem	2/22/2017 11:04:52 AM	1768 (0x06E8)
    Unable to delete directory D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe\VFS\ProgramFilesCommonX64 (0x80070091).  Continuing.	ApplyOperatingSystem	2/22/2017 11:04:57 AM	1768 (0x06E8)
    Unable to delete directory D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe\VFS\SystemX64 (0x80070091).  Continuing.	ApplyOperatingSystem	2/22/2017 11:04:57 AM	1768 (0x06E8)
    Unable to delete directory D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe\VFS (0x80070091).  Continuing.	ApplyOperatingSystem	2/22/2017 11:04:57 AM	1768 (0x06E8)
    Unable to delete directory D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe (0x80070091).  Continuing.	ApplyOperatingSystem	2/22/2017 11:04:57 AM	1768 (0x06E8)
    Unable to delete directory D:\Program Files\WindowsApps (0x80070091).  Continuing.	ApplyOperatingSystem	2/22/2017 11:04:57 AM	1768 (0x06E8)
    Unable to delete directory D:\Program Files (0x80070091).  Continuing.	ApplyOperatingSystem	2/22/2017 11:04:57 AM	1768 (0x06E8)
    Skipping D:\StateStore for wipe	ApplyOperatingSystem	2/22/2017 11:04:57 AM	1768 (0x06E8)
    Skipping D:\System Volume Information for wipe	ApplyOperatingSystem	2/22/2017 11:04:57 AM	1768 (0x06E8)
    Skipping D:\_SMSTaskSequence for wipe	ApplyOperatingSystem	2/22/2017 11:04:57 AM	1768 (0x06E8)
    Unable to delete directory 'D:\' (0x80070091). Retrying after delay.	ApplyOperatingSystem	2/22/2017 11:04:57 AM	1768 (0x06E8)
    Unable to delete directory D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe\VFS\ProgramFilesCommonX64 (0x80070091).  Continuing.	ApplyOperatingSystem	2/22/2017 11:05:02 AM	1768 (0x06E8)
    Unable to delete directory D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe\VFS\SystemX64 (0x80070091).  Continuing.	ApplyOperatingSystem	2/22/2017 11:05:02 AM	1768 (0x06E8)
    Unable to delete directory D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe\VFS (0x80070091).  Continuing.	ApplyOperatingSystem	2/22/2017 11:05:02 AM	1768 (0x06E8)
    Unable to delete directory D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe (0x80070091).  Continuing.	ApplyOperatingSystem	2/22/2017 11:05:02 AM	1768 (0x06E8)
    Unable to delete directory D:\Program Files\WindowsApps (0x80070091).  Continuing.	ApplyOperatingSystem	2/22/2017 11:05:02 AM	1768 (0x06E8)
    Unable to delete directory D:\Program Files (0x80070091).  Continuing.	ApplyOperatingSystem	2/22/2017 11:05:02 AM	1768 (0x06E8)
    Skipping D:\StateStore for wipe	ApplyOperatingSystem	2/22/2017 11:05:02 AM	1768 (0x06E8)
    Skipping D:\System Volume Information for wipe	ApplyOperatingSystem	2/22/2017 11:05:02 AM	1768 (0x06E8)
    Skipping D:\_SMSTaskSequence for wipe	ApplyOperatingSystem	2/22/2017 11:05:02 AM	1768 (0x06E8)
    hr, HRESULT=80070091 (e:\nts_sccm_release\sms\framework\core\ccmcore\ccmfile.cpp,1134)	ApplyOperatingSystem	2/22/2017 11:05:02 AM	1768 (0x06E8)
    Failed to delete directory 'D:\'	ApplyOperatingSystem	2/22/2017 11:05:02 AM	1768 (0x06E8)
    Filesystem::Directory::RecursiveDeleteAndRetry(volume, filesToKeep, 25, 0), HRESULT=80070091 (e:\nts_sccm_release\sms\client\osdeployment\applyos\installcommon.cpp,921)	ApplyOperatingSystem	2/22/2017 11:05:02 AM	1768 (0x06E8)
    WipeVolume( this->targetVolume, ImageInstaller::progressText, &filesToKeep ), HRESULT=80070091 (e:\nts_sccm_release\sms\client\osdeployment\applyos\installimage.cpp,713)	ApplyOperatingSystem	2/22/2017 11:05:02 AM	1768 (0x06E8)
    ApplyImage(), HRESULT=80070091 (e:\nts_sccm_release\sms\client\osdeployment\applyos\installimage.cpp,1874)	ApplyOperatingSystem	2/22/2017 11:05:02 AM	1768 (0x06E8)
    Apply(), HRESULT=80070091 (e:\nts_sccm_release\sms\client\osdeployment\applyos\installimage.cpp,2063)	ApplyOperatingSystem	2/22/2017 11:05:02 AM	1768 (0x06E8)
    Installation of image 1 in package P0100454 failed to complete.. 
    The directory is not empty. (Error: 80070091; Source: Windows)	ApplyOperatingSystem	2/22/2017 11:05:02 AM	1768 (0x06E8)
    

    Wednesday, February 22, 2017 5:39 PM
  • Are the drives protected with BitLocker?


    Jason | http://blog.configmgrftw.com | @jasonsandys

    Wednesday, February 22, 2017 5:52 PM
  • We do use BitLocker but these ones I'm testing I haven't encrypted. I just applied our production image and went straight to my UDI task sequence after that.
    Wednesday, February 22, 2017 5:54 PM
  • I saw on other threads that it could be due to special characters or trailing period in the name but I do not see anything here:

    Volume in drive D is OSDisk
     Volume Serial Number is 60AD-CB2D

     Directory of D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe

    02/22/2017  02:17 PM    <DIR>          .
    02/22/2017  02:17 PM    <DIR>          ..
    02/22/2017  10:27 AM    <DIR>          VFS
                   0 File(s)              0 bytes

     Directory of D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe\VFS

    02/22/2017  10:27 AM    <DIR>          .
    02/22/2017  10:27 AM    <DIR>          ..
    02/22/2017  10:27 AM    <DIR>          ProgramFilesCommonX64
    02/22/2017  10:27 AM    <DIR>          SystemX64
                   0 File(s)              0 bytes

     Directory of D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe\VFS\ProgramFilesCommonX64

    02/22/2017  10:27 AM    <DIR>          .
    02/22/2017  10:27 AM    <DIR>          ..
    02/22/2017  10:27 AM    <DIR>          Microsoft Shared
                   0 File(s)              0 bytes

     Directory of D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe\VFS\ProgramFilesCommonX64\Microsoft Shared

    02/22/2017  10:27 AM    <DIR>          .
    02/22/2017  10:27 AM    <DIR>          ..
    02/22/2017  10:27 AM    <DIR>          OFFICE16
                   0 File(s)              0 bytes

     Directory of D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe\VFS\ProgramFilesCommonX64\Microsoft Shared\OFFICE16

    02/22/2017  10:27 AM    <DIR>          .
    02/22/2017  10:27 AM    <DIR>          ..
    02/22/2017  10:27 AM    <DIR>          1033
    02/22/2017  10:28 AM         2,268,720 ACECORE.DLL
    02/22/2017  10:28 AM           620,080 ACEDAO.DLL
    02/22/2017  10:28 AM            47,152 ACEERR.DLL
    02/22/2017  10:28 AM           874,544 ACEES.DLL
    02/22/2017  10:28 AM           250,416 ACEEXCH.DLL
    02/22/2017  10:28 AM           527,920 ACEEXCL.DLL
    02/22/2017  10:28 AM           342,064 ACEODBC.DLL
    02/22/2017  10:28 AM            22,576 ACEODDBS.DLL
    02/22/2017  10:28 AM            22,576 ACEODEXL.DLL
    02/22/2017  10:28 AM            22,576 ACEODTXT.DLL
    02/22/2017  10:28 AM           434,224 ACEOLEDB.DLL
    02/22/2017  10:28 AM           242,736 ACETXT.DLL
    02/22/2017  10:28 AM         3,056,176 ACEWDAT.DLL
    02/22/2017  10:28 AM           327,728 ACEXBE.DLL
    02/22/2017  10:28 AM           999,080 ADAL.DLL
    02/22/2017  10:28 AM           404,608 AirSpace.Etw.man
    02/22/2017  10:28 AM            89,648 AIRWER.DLL
    02/22/2017  10:27 AM    <DIR>          Cultures
    02/22/2017  10:28 AM           491,152 EXPSRV.DLL
    02/22/2017  10:28 AM           200,240 EXP_PDF.DLL
    02/22/2017  10:28 AM            93,744 EXP_XPS.DLL
    02/22/2017  10:28 AM             4,142 HeartbeatConfig.xml
    02/22/2017  10:28 AM        22,965,504 MSO.DLL
    02/22/2017  10:28 AM         4,422,192 Mso20win32client.dll
    02/22/2017  10:28 AM         6,462,512 Mso30win32client.dll
    02/22/2017  10:28 AM         4,216,880 MSO40UIRES.DLL
    02/22/2017  10:28 AM         9,718,320 Mso40UIwin32client.dll
    02/22/2017  10:28 AM            67,632 mso50win32client.dll
    02/22/2017  10:28 AM         7,347,248 Mso98win32client.dll
    02/22/2017  10:28 AM        13,090,352 MSO99LRES.DLL
    02/22/2017  10:28 AM         7,393,840 Mso99Lwin32client.dll
    02/22/2017  10:28 AM           164,052 MSOICONS.EXE.6.ico
    02/22/2017  10:28 AM         1,446,248 MSOIDCLIL.DLL
    02/22/2017  10:28 AM           830,864 MSOIDRES.DLL
    02/22/2017  10:28 AM            66,096 MSOPRIV.DLL
    02/22/2017  10:28 AM            29,384 MsoRes.dll
    02/22/2017  10:28 AM            73,776 MSOXEV.DLL
    02/22/2017  10:28 AM            70,704 MSOXMLMF.DLL
    02/22/2017  10:28 AM         1,514,032 MSPTLS.DLL
    02/22/2017  10:28 AM           658,480 MSSOAP30.DLL
    02/22/2017  10:28 AM           660,136 msvcp120.dll
    02/22/2017  10:28 AM           963,240 msvcr120.dll
    02/22/2017  10:28 AM             7,699 MUAUTH.CAB
    02/22/2017  10:28 AM            29,744 MUOPTIN.DLL
    02/22/2017  10:28 AM            10,288 OFFREL.DLL
    02/22/2017  10:28 AM            32,072 OPTINPS.DLL
    02/22/2017  10:28 AM            32,968 oregres.dll
    02/22/2017  10:28 AM         2,675,760 RICHED20.DLL
    02/22/2017  10:28 AM            18,584 VBAJET32.DLL
    02/22/2017  10:28 AM           170,032 WISC30.DLL
    02/22/2017  10:28 AM           158,256 WXPNSE.DLL
                  50 File(s)     96,638,997 bytes

     Directory of D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe\VFS\ProgramFilesCommonX64\Microsoft Shared\OFFICE16\1033

    02/22/2017  10:27 AM    <DIR>          .
    02/22/2017  10:27 AM    <DIR>          ..
    02/22/2017  10:28 AM         1,652,272 MSOINTL.DLL
    02/22/2017  10:28 AM            64,560 msointl30.dll
                   2 File(s)      1,716,832 bytes

     Directory of D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe\VFS\ProgramFilesCommonX64\Microsoft Shared\OFFICE16\Cultures

    02/22/2017  10:27 AM    <DIR>          .
    02/22/2017  10:27 AM    <DIR>          ..
    02/22/2017  10:28 AM         2,186,800 OFFICE.ODF
                   1 File(s)      2,186,800 bytes

     Directory of D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe\VFS\SystemX64

    02/22/2017  10:27 AM    <DIR>          .
    02/22/2017  10:27 AM    <DIR>          ..
    02/22/2017  10:28 AM           334,616 concrt140.dll
    02/22/2017  10:28 AM           639,728 msvcp140.dll
    02/22/2017  10:28 AM           394,504 vccorlib140.dll
    02/22/2017  10:28 AM            89,328 vcruntime140.dll
                   4 File(s)      1,458,176 bytes

         Total Files Listed:
                  57 File(s)    102,000,805 bytes
                  23 Dir(s)  246,378,483,712 bytes free

    Wednesday, February 22, 2017 6:28 PM
  • Running the below command removes Program Files without issue while in PE:

    rd "d:\program files" /S

    Wednesday, February 22, 2017 6:34 PM
  • I am running into the same issue where Apply Operating System fails because these files cannot be removed.

    When I do rd "D:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe\VFS\ProgramFilesCommonX64" /S, WinPE returns the following.

    The directory is not empty

    When try to get into the ProgramFilesCommonX64 folder to see what's in the directory, it returns:

    The file cannot be accessed by the system

    How would these files get onto the computer in the first place?  I checked a base Windows 10 1607 image and it does not have the VFS directory.

    Friday, February 24, 2017 6:41 PM
  • Running the below command removes Program Files without issue while in PE:

    rd "d:\program files" /S

    Hi,

        Have you got this issue resolved now? If so, could you please share your solution with us? Thank you.

    Regards,

    Jimmy


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, March 15, 2017 6:35 AM
    Moderator
  • Here's the workaround I am using. After working with MS, they were able to reproduce it when refreshing 1607. My case is still open.

    Right before the Apply Operating System image action, I added an OfficeHub removal group and assigned "MyDrive" to the drive where it detects Program Files.

    Here's the condition I put on each Set Task Variable actions, just changing the drive letter for each action.

    The command I run at the end is to delete the folder that wasn't getting wiped and adding "continue on error."


    Wednesday, March 15, 2017 1:13 PM
  • Thanks for posting. This workaround works for me too.  The version of the Microsoft.MicrosoftOfficeHub folder might change periodically, though.

    Did Microsoft find a more permanent fix for your case yet?  I'm considering opening a case.

    I'm using:

    cmd.exe /c rd "%MyDrive%\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.8107.7600.0_x64__8wekyb3d8bbwe" /S /Q"

    Wednesday, May 10, 2017 5:29 PM
  • Unfortunately i don't have a permanent fix for this yet.
    Monday, May 15, 2017 3:00 PM
  • I can confirm this issue as well;

    Looks like you are using an MDT integrated task sequence. I think you can replace your task group with a single command:

    cmd /c rd "%OSDisk%\Program Files\WindowsApps" /S /Q

    Testing this at the moment.

    Wednesday, May 17, 2017 2:10 PM
  • Did this work for you?
    Thursday, May 18, 2017 6:57 PM
  • Yep, I've done two test deployments and the task sequence completes successfully. User files are migrated successfully. I've also added a condition to the "Remove WindowsApps" group so it only runs during refresh to make it a bit cleaner.

    I have a new issue though (don't think it is related to the WindowsApps issue), whereby the Configuration Manager client on the refreshed computers does not enter HTTPS/PKI mode, even though they have a valid computer certificate (the certificate was issued before the rebuild). When I check the client it shows If I request a new certificate on the rebuilt computer then the SCCM Client reports PKI mode and starts working. Looks like it just doesn't play nice with the previous certificate
    Friday, May 19, 2017 7:53 AM
  • We have this problem with Microsoft.MicrosoftOfficeHub_17.8225.5925.0_x64.

    We have tried rd command, taking ownership, changing ACLs to no avail. The store app auto installs an application called get office and it gets it updated to 17.8225. This is the version you will get on Redstone. Then if you reimage this machine keeping statestore the program files directory cannot be removed because of these two folders:

    C:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.8225.5925.0_x64__8wekyb3d8bbwe\VFS\SystemX64

    C:\Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.8225.5925.0_x64__8wekyb3d8bbwe\VFS\ProgramFilesCommonX64

    Anyone with this specific versions resolved this issue?

    Wednesday, June 21, 2017 5:00 PM
  • I am in the same boat. I've come across this on the following folders:

    Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe

    Program Files\WindowsApps\Microsoft.MicrosoftOfficeHub_17.8312.7601.0_x64__8wekyb3d8bbwe

    rd "%OSDISK%\Program Files\WindowsApps" /S /Q does not work.  Neither does trying to set permissions via cacls. 

    This is happening for a Refresh scenario via SCCM task sequence.  This has been going on for more than half a year now.  Very frustrating, Microsoft needs to fix this!

    Tuesday, July 4, 2017 8:03 PM
  • Have you opened a case with Microsoft support?

    If not, how would they know that there is an issue?


    Jason | http://blog.configmgrftw.com | @jasonsandys

    Tuesday, July 4, 2017 8:31 PM
  • A case was open by jrod_32 above...  we are discussing this on Microsoft's TechNet forums.  

    I sure hope Microsoft is aware of this, everything mentioned here is a Microsoft product.

    Tuesday, July 11, 2017 12:42 PM
  • They can't be aware of every error or issue that happens. It simply doesn't work that way.

    Discussing is fine but if it s a bug or something they don't know about, then discussing is ultimately unhelpful without brining them into the mix.


    Jason | http://blog.configmgrftw.com | @jasonsandys

    Wednesday, July 12, 2017 12:06 AM
  • As mentioned earlier, a case was already opened by jrod_32. 

    This MicrosoftOfficeHub (Get Office) seems to be downloaded automatically for quite a few systems.  Performing a Refresh on 1607 is a pretty standard function that IT would perform.  Surely Microsoft must have come across this scenario when they tested the Refresh on Windows 10...

    I am curious as to what came of jrod's case.

    Monday, July 17, 2017 12:53 PM
  • Because the work around was working for me, I was okay with them fixing in the next release. I was told that it will be fixed in the next CB release (not sure of the version number).
    Monday, July 24, 2017 8:50 PM
  • Thanks for the update jrod_32.

    For me the workaround is to use one of the many powershells found online to uninstall the Microsoft.MicrosoftOfficeHub and then trigger the Refresh task sequence from Software Center.

    Friday, July 28, 2017 8:07 PM
  • Unfortunately i don't have a permanent fix for this yet.

    I was having the same issue.  Annoyingly it was right when I added some other stuff to my build so took me a while to track down the issue.

    I came across this thread and so tried running the Remove Apps powershell script from WinPE.  This failed with some funky error which I tracked down to the Powershell DISM dll getting corrupted at start up. https://deploymentpros.wordpress.com/2015/11/18/dism-cmdlets-fail-to-run-in-win-pe-with-mdt-2013-update-1-workaround/

    The last comment, on this thread mentions that the work around is no longer required for ADK 1607.  So I upgraded to 1607 and got the powershell commands working, but still couldn't remove Provisioned Apps. Didn't test against USMT.

    Upgraded MDT to 8443 - Still no joy on removing the apps, but regardless I can now build with USMT and this issue has gone away.

    Long story short - a permanent fix (for me at least) is to upgrade to ADK 1607 and MDT 8443.

    Wednesday, August 16, 2017 10:57 PM
  • THANK YOU! I've been finding Windows Apps have been causing a multitude of complications on Imaging. Saved another headache based weekend. =D

    Also, doesn't help that at our district I live Bleeding Edge Technology and Software. 1707 Windows 10, Server 2016, System Center 1707, ect.

    Friday, March 16, 2018 7:10 PM