In place upgrade of Win10 1709 (VM) to 20H2 - Failing to mount WIM file (Error 0x80070522)

Max_D 101 Reputation points
2021-08-16T05:51:09.363+00:00

I've tried every solution I could research to get an in place upgrade of WIN10 (1709):

  • Media Creation Tool
  • Upgrade Assistant
  • 1809 ISO
  • 20H2 ISO
  • 21H1 ISO
  • Disable UAC
  • Disabled all relevant local security policies that may interfere
  • Disabled AV agent
  • SFC / Scannow
  • SetupDiag.exe

But each and every time it fails around the 80-85% mark with the following error

Failed to mount WIM file C:\$WINDOWS.~BT\Sources\SafeOS\winre.wim. Error 0x80070522

I'm a local admin as well as running the setup.exe as admin, but for some reason the DISM command cannot mount the winre.wim file at a crucial stage in the upgrade process, so it simply fails each time.

Can anyone think of something I've missed that would cause the permission error each time?

Windows for business | Windows Client for IT Pros | Storage high availability | Virtualization and Hyper-V
Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

Accepted answer
  1. Max_D 101 Reputation points
    2021-08-31T22:21:58.303+00:00

    RESOLVED!

    After disabling / relaxing every 'common culprit' local security policy, I bit the bullet and reset all to defaults:

    secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose

    [https://www.tenforums.com/tutorials/68588-reset-local-security-policy-settings-default-windows.html][1]

    I was then able to manually run the DISM command - successfully!

    With the #1 issue out of the way, the automated WIN 10 update process ran without an issue.

    Dev box is now running 21H1.

    1 person found this answer helpful.
    0 comments No comments

6 additional answers

Sort by: Most helpful
  1. Docs 15,761 Reputation points
    2021-08-16T07:38:27.647+00:00

    Please post a share link with the setupdiag results.

    https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/in-place-system-upgrade

    .
    .
    .
    .
    Please remember to vote and to mark the replies as answers if they help.

    On the bottom of each post there is:

    Propose as answer = answered the question

    On the left side of each post: Vote = a helpful post
    .
    .
    .
    .

    0 comments No comments

  2. Max_D 101 Reputation points
    2021-08-16T22:07:51.563+00:00

    123648-setupdiagresults.log

    Thanks @Docs - I've attached the typical log detailing the same result I get each time.

    0 comments No comments

  3. Max_D 101 Reputation points
    2021-08-30T00:51:28.337+00:00

    CMountWIM::DoExecute: Failed to mount WIM file C:\$WINDOWS.~BT\Sources\SafeOS\winre.wim. Error 0x80070522[gle=0x00000522]

    I thought I might have resolved the issue after running a WU reset script I found - but after a hopefull 45mins, it still fails with the error above.

    The script (in case it helps someone else) is here:

    https://www.yourwindowsguide.com/2015/12/reset-windows-update.html#.YSwXJ44zZjE

    Appreciate any further advice on this.

    It's a VM that contains a lot of dev history and applications. I would rather not have to start re-building the whole environment from scratch if it can be helped.

    0 comments No comments

  4. Docs 15,761 Reputation points
    2021-08-30T15:54:26.83+00:00

    In case this is helpful: 0x80070522 = Error_privilege_not_held

    .
    .
    .
    .
    Please remember to vote and to mark the replies as answers if they help.

    On the bottom of each post there is:

    Propose as answer = answered the question

    On the left side of each post: Vote = a helpful post
    .
    .
    .
    .

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.