Windows Server

Error 0xc1420117: The directory could not be completely unmounted, this is usually due to applications that still have files open within the mount directory

Deployment Image Servicing and Management (DISM) is a tool that allows you to service your images offline. Here are some DISM related errors, Failure 5627: How to fix error 0x800f0805, run DISM executable, Error 0xc1420127: The specified image in the specified wim is already mounted for read and write access.

Before I proceed with the steps to resolve this issue, I would like to explain some key differences between mounting and unmounting a wim file.
- If you need to make changes to a WIM file by adding or removing packages, you will need to mount it properly on Windows using DISM, a command line that enumerates, installs, uninstalls, configures, and updates features and packages in Windows images.
- After you modify a mounted image, you must unmount it. If you mounted your image with the default read/write permissions, you can commit your changes. This makes your modifications a permanent part of the image.

You may encounter this issue when trying to mount an image (install.wim) file. This error was prompted in my case because I tried to mount a new Windows image while having some residue left in the previously mounted point. See the following hyperlink for more details on ADK, MDT, Microsoft Endpoint Configuration Manager (SCCM), Intune, Autopilot, and WSUS. Also, see how to configure and deploy Windows using Microsoft Deployment Toolkit, and Windows Deployment Services for Windows 10 (ADK, MDT, and WDS).

Step 1: Only perform this step if you have some residue folder left in the mounted directory (folder).
– To fix this issue, ensure these folders are correctly removed (deleted) before trying to mount the wim file again. See this guide on how to go about this issue “The action cannot be completed because the folder or file is open in another program: How to determine where a file is open in windows“.

Step 2: Now that the folders are completely removed, you will have to run the command again to unmount the Windows Image (install.wim file). The following command below should be optimized to work in your environment.

Dism /Unmount-image /MountDir:<target_mount_directory> {/Commit | /Discard}

After unmounting the win file, you should be able to mount your Windows image again and continue with the modification by using the command below. Please modify this command in order to reflect your information. For more information, see the following guide on how to mount and unmount a Windows image file.

DISM /Mount-Wim /WimFile:"filename.wim" /index:3 /MountDir:"c:\temp"

I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x