Though you can easily mount an image (*.wim) file using right click context menu in File Explorer by select the Mount option on that menu. This simply mounts the image file and assign a temporary drive letter to it. However, in some cases you need to work in Command Prompt interface and in such cases, you need to mount files via Deployment Image Servicing and Management (DISM) commands.
Mounting an image file via DISM is quite simple and you need to run following command after substituting correct parameters:
Dism /Mount-Image /ImageFile:C:\test\images\myimage.wim /index:1 /MountDir:C:\test\offline
Here, you need to modify C:\test\images/myimage.wim with your image file location.
Recently, while working with this command and mounting an image file, we came around following error:
You do not have permissions to mount and modify this image.
Verify that you have Read/Write permissions or mount the image using the /ReadOnly option. Note that you cannot commit changes to an image with read-only permissions.
Just in case you’re also having this same issue, you can try the steps mentioned below to bypass the error.
FIX : You Do Not Have Permissions To Mount And Modify This Image While Mounting Image File Using DISM In Windows 10
1. Press + E and open File Explorer. Browse to the image (.wim) file and right click over it and select Properties.
2. In the file property sheet, on the General tab, you need to make sure the Read-only option is unchecked. If it is checked, uncheck it.
3. Then switch to Security tab in the same properties window and highlight your user account. Checkout the permissions you’ve have and make sure you necessarily have Read, Write and Modify permissions. For better results, it might be good if you’ve Full control on the file. In case, if you don’t have either of these permissions, you can take ownership of the file and assign those permissions to you.
After making the changes, click Apply followed by OK. You can now re-try to mount image file and this time it should work without any errors.
Hope this helps!