DISM Fails to Unmount WIM with "Access is Denied" (Error 0x80070005) in Windows 11 24H2

Thirumurugan Candane 5 Reputation points
2024-11-19T06:03:36.27+00:00

Encountering an issue while trying to unmount a WIM file using DISM on Windows 11 24H2. The command fails with "Access is Denied" (Error 0x80070005). Below are the details of the command, environment, and error log:

Command used to unmount image:

DismUnmountImage();

Environment:

  • Operating System: Windows 11 24H2
  • DISM Version: Latest ADK installed
  • WIM File: Created using copype

Error Log Excerpt:

[1628.1372] Received unmount request.
[1628.1372] Unmount complete.
[1628.6740] Wimserv exiting per terminate event.
[1628.6740] Wimserv stopped.
[488.9632] [0x80070005] FIOEnumerateReparsePoints:(627): Access is denied.
[488.9632] [0x80070005] CleanupExtractRemainingStubs:(534): Access is denied.
[488.9632] [0x80070005] WIMUnmountImageHandle:(1683): Access is denied.
[488.9632] [0x80070005] WIMUnmountImage:(2048): Access is denied.
2024-11-18 15:51:36, Error                 DISM   DISM WIM Provider: PID=488 TID=9632 onecore\base\ntsetup\opktools\dism\providers\wimprovider\dll\wimimage.cpp:93 - CWimImage::Unmount(hr:0x80070005)
2024-11-18 15:51:36, Error                 DISM   API: PID=488 TID=9632 onecore\base\ntsetup\opktools\dism\api\lib\imagingcommandobject.cpp:671 - CUnmountImageCommandObject::InternalExecute(hr:0x80070005)
2024-11-18 15:51:36, Error                 DISM   API: PID=488 TID=9632 InternalExecute failed - CBaseCommandObject::Execute(hr:0x80070005)
2024-11-18 15:51:36, Error                 DISM   API: PID=488 TID=4356 CUnmountImageCommandObject failed - DismUnmountImageInternal(hr:0x80070005)
2024-11-18 15:51:36, Info                  DISM   API: PID=488 TID=4356 GetReferenceCount hr: 0x0 - CSessionTable::RemoveSession

Ensured that:

  1. The mount directory and the WIM file are not in use by any other process.
  2. DISM is run with administrative privileges.
  3. No antivirus software or third-party programs are interfering with the process.

Despite these checks, the issue persists.

Questions:

  1. What could be causing the "Access is Denied" error during unmounting?
  2. Are there any additional logs or diagnostics to check to pinpoint the issue?
  3. Does this error indicate a permissions problem, or could it be related to the WIM file or system configuration?
  4. Is it ok to use DISM API and DISM command line in the same process at a time?

Any insights or troubleshooting steps would be greatly appreciated. Thank you!

Microsoft Deployment Toolkit
Microsoft Deployment Toolkit
A collection of Microsoft tools and documentation for automating desktop and server deployment. Previously known as Microsoft Solution Accelerator for Business Desktop Deployment (BDD).
906 questions
Windows 10 Setup
Windows 10 Setup
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,951 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,012 questions
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Deployment: The process of delivering, assembling, and maintaining a particular version of a software system at a site.
999 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Matthew Rogers 0 Reputation points
    2024-11-19T16:42:17.43+00:00

    I'm hitting the exact same issue that Thirumurugan is describing.

    In my scenario I have two virtual machines: Win11-23H2 and a Win11-24H2; both have ADK 10.1.22621.1 installed. I launch a command prompt with admin privileges and run the following:

    "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\DandISetEnv.bat"
    copype amd64 c:\temp\foobar
    mkdir c:\temp\mount
    dism /Mount-Image /ImageFile:"C:\temp\foobar\media\sources\boot.wim" /index:1 /MountDir:"c:\temp\mount"
    dism /Unmount-Image /MountDir:"c:\temp\mount" /commit
    

    Win11-23H2 works great, but Win11-24H2 fails with the same access denied error:

    2024-11-19 08:32:43, Info                  DISM   DISM Imaging Provider: PID=12212 TID=10756 The provider VHDManager does not support CreateDismImage on c:\temp\mount - CGenericImagingManager::CreateDismImage
    [11124.11852] Received unmount request.
    [11124.11852] Unmount complete.
    [11124.9212] Wimserv exiting per terminate event.
    [11124.9212] Wimserv stopped.
    [12212.10756] [0x80070005] FIOEnumerateReparsePoints:(627): Access is denied.
    [12212.10756] [0x80070005] CleanupExtractRemainingStubs:(534): Access is denied.
    [12212.10756] [0x80070005] WIMUnmountImageHandle:(1683): Access is denied.
    [12212.10756] [0x80070005] WIMUnmountImage:(2048): Access is denied.
    2024-11-19 08:32:59, Error                 DISM   DISM WIM Provider: PID=12212 TID=10756 onecore\base\ntsetup\opktools\dism\providers\wimprovider\dll\wimimage.cpp:93 - CWimImage::Unmount(hr:0x80070005)
    
    

    I do not have a question to add - just adding more information to Thirumurugan's reported issue.

    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more

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.