Windows Windows Server

Unable to access the image: Make sure that the image path and the Windows directory for the image exist and you have Read permissions on the folder

mountedimagenotaccessible

You may see “Unable to access the image when trying to read or write via DISM. DISM is a utility for advanced users to clean, slim, backup, update or recover their Windows operating system. Deployment Image Servicing and Management (DISM.exe) is a command-line tool that can be used to service a Windows image or to prepare a Windows Preinstallation Environment (Windows PE) image. For a similar issue, see how to resolve “Error 740: Elevated permissions are required to run DISM“. Also see, You require permission from trustedinstaller: How to delete or rename files protected by Trusted Installer. The reason for this error in my case was, that I thought I had already mounted the image “install.wim”, then ran a script against the presumed mounted install image. Therefore the error “Unable to access the image:

To fix this issue, make sure that the image path and the Windows directory for the image exist and you have Read permissions on the folder" was prompted. Here is a similar error that might be of interest to you: Error 0xc1510111: You do not have permissions to mount and modify this image

Note: To confirm what I have just spoken about. The DISM log file can be found at this location C:\windows\Logs\DISM\dism.log. You may also want to check how this error was resolved: Error 0xc1420127: The specified image in the specified wim is already mounted for read and write access.

Capturedism

Below is the log output. As you can see from the error log, the “DISM.EXE: Failed to access the image folder or image’s windows folder”. ere are some related errors you can encounter when mounting images: Error 0x80070002: When trying to mount an image file, and how to fix error 0xc1510114: The wim file needs to be remounted.

[10392.14636] [0x80070002] FIOReadFileIntoBuffer:(1456): The system cannot find the file specified.
[10392.14636] [0xc142011c] UnmarshallImageHandleFromDirectory:(641)
[10392.14636] [0xc142011c] WIMGetMountedImageHandle:(2910)
2022-04-13 11:47:11, Info                  DISM   DISM WIM Provider: PID=10392 TID=14636 [X:\DISMMOUNT] is not a WIM mount point. - CWimMountedImageInfo::Initialize
2022-04-13 11:47:11, Info                  DISM   DISM FFU Provider: PID=10392 TID=14636 [X:\DISMMOUNT] is not recognized by the DISM FFU provider. - CFfuImage::Initialize
2022-04-13 11:47:11, Info                  DISM   DISM VHD Provider: PID=10392 TID=14636 [X:\DISMMOUNT] is not recognized by the DISM VHD provider. - CVhdImage::Initialize
2022-04-13 11:47:11, Error                 DISM   DISM.EXE: Failed to access the image folder or image's windows folder.
2022-04-13 11:47:11, Info                  DISM   DISM.EXE: Image session has been closed. Reboot required=no.
2022-04-13 11:47:11, Info                  DISM   DISM.EXE: 
2022-04-13 11:47:11, Info                  DISM   DISM.EXE: <----- Ending Dism.exe session ----->
2022-04-13 11:47:11, Info                  DISM   DISM.EXE:

Resolution

Ensure the install image is mounted before trying to run scripts against the “presumed” mounted image. Wish to unmount an image, please see this link. Also, wish to learn how to discard and commit changes to the mounted images, please visit this link. Here is how you can mount an image with DISM. You may also want to see this guide: How to remove Microsoft Defender update on Windows 10 and Windows Server image

dism /Mount-Wim /WimFile:G:\Path-to-the-install.wim-file\install.wim /Index:2 /MountDir:G:\Path-to-the-mount-file\MountZ

After the file has been mounted, you can now start running scripts against it such as removing the pre-provisioned apss from the image.

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