Windows 10: How to mount wim file with DISM?

Discus and support How to mount wim file with DISM? in Windows 10 Software and Apps to solve the problem; I am trying to mount a wim file to customize the windows 11 installation. I downloaded the Windows 11 Media creation tool and created a usb key with... Discussion in 'Windows 10 Software and Apps' started by Brent Bolton, Mar 17, 2024.

  1. How to mount wim file with DISM?


    I am trying to mount a wim file to customize the windows 11 installation. I downloaded the Windows 11 Media creation tool and created a usb key with it. I noticed the usb key had 2 swm files. I don't know if you can mount 2 swm files. I would prefer to mount 2 swm files instead to save a step in the customized windows 11 installation process. I merged the 2 swm files into a single wim file for mounting, but it failed to mount. I tried an updated DISM tool from the Windows ADK and it failed.Here is the built-in dism log:2024-03-17 09:52:47, Info DISM PID=7860 TID=12292 Scrat

    :)
     
    Brent Bolton, Mar 17, 2024
    #1
  2. johnspack Win User

    Compacting a wim file?

    Sorry, no idea where to put this. I just recently learned how to use dism. I use it to slipstream all hotfixes and ie10 ect into an AIO install disc. The problem is, it creates a huge install.wim after 8 index mounts and slipstreams. Considering all 8 images use the same darn wim and files, don't know why it has to increase the wim size by 1gig. Either I need to figure out how to use the same wim.install file for all indexes, or I need to compact the wim file which is now 4gbs with ie10 and all updates to April. Any way to do either?
     
    johnspack, Mar 17, 2024
    #2
  3. johnspack Win User
    Compacting a wim file?

    Actually it turns out the answer is the dism that comes with Win8. Using the new Export-Image command, and a simple batch file, was able to compress my AIO wim by several hundred mbs.
     
    johnspack, Mar 17, 2024
    #3
  4. swegmike Win User

    How to mount wim file with DISM?

    DISM mount issues of OS WIM and Dataarchive Wim?

    I have created a wim image for my OS drive C. I have another partition marked Tools which has windows installed programs patch changed to point to this drive along with some data files. A). After creating an OS wim image, I tried to mount it using dism for both variations below and they both have the same problem. dism /Mount-image /ImageFile:G:\MyInstallnew.wim /Index:1 /MountDir:G:\wim4 /ReadOnly dism /Mount-Wim /WimFile:G:\MyInstallnew.wim /Index:1 /MountDir:G:\wim5 /ReadOnly A). Properties on of the drive C is about 73Gigs. During the mounting step, I randomly check the content at the command prompt in each of the wim directories and see that the original drive C content is being added to the wim mount points above. I can do a file system properties of these wim directories and based on the % complete see it is getting close to the total disk size value. B). After 100% complete bar, it takes a few minutes to get down before showing an error message vs. expecting the command prompt. During this wait time, I see that in the wim directory all the directories and files starting to disappear. G:\>dism /Mount-Wim /WimFile:G:\MyInstallnew.wim /Index:1 /MountDir:G:\wim4 /ReadOnly Deployment Image Servicing and Management tool Version: 10.0.19041.844 Mounting image [==========================100.0%==========================] Error: 5 Access is denied. The DISM log file can be found at X:\windows\Logs\DISM\dism.log C). for the OS wim the remaining content only shows Users/name/Onedrive/Documents I then tried to manually delete all the content and directories in the wim4 directory; however, it won't delete the directory names although the content shows empty. Upon doing dir /S /A /Q /S to show any hidden files and the ownership I see numerouse files which I can't delete even when I use a usb boot disk and go to the command prompt and delete them recursively using del command. So the files shown below can't be deleted. How to fix and delete the content since trying to remount to the same wim directory give a different error message. Volume in drive G is DataArchive Volume Serial Number is F2F0-C834 Directory of G:\wim4 12/20/2023 09:07 AM <DIR> NT SERVICE\TrustedInsta. 296 .:$WIMMOUNTDATA:$DATA 12/20/2023 09:07 AM <DIR> NT AUTHORITY\SYSTEM .. 12/19/2023 03:02 PM <DIR> NT AUTHORITY\SYSTEM Users 0 File(s) 0 bytes Directory of G:\wim4\Users 12/19/2023 03:02 PM <DIR> NT AUTHORITY\SYSTEM . 12/19/2023 03:02 PM <DIR> NT SERVICE\TrustedInsta.. 296 ..:$WIMMOUNTDATA:$DATA 12/19/2023 03:02 PM <DIR> BUILTIN\Administrators swm 0 File(s) 0 bytes Directory of G:\wim4\Users\swm 12/19/2023 03:02 PM <DIR> BUILTIN\Administrators . 12/19/2023 03:02 PM <DIR> NT AUTHORITY\SYSTEM .. 12/19/2023 03:20 PM <DIR> ... OneDrive 272 OneDrive:${3D0CE612-FDEE-43f7-8ACA-957BEC0CCBA0}.SyncRootIdentity:$DATA 0 File(s) 0 bytes Directory of G:\wim4\Users\swm\OneDrive 12/19/2023 03:20 PM <DIR> ... . 272 .:${3D0CE612-FDEE-43f7-8ACA-957BEC0CCBA0}.SyncRootIdentity:$DATA 12/19/2023 03:20 PM <DIR> BUILTIN\Administrators .. 12/13/2023 04:18 PM 63 ... .849C9593-D756-4E56-8D6E-42412F2A707B 11/07/2023 06:09 PM 96 ... desktop.ini 12/13/2023 04:18 PM <DIR> ... Documents 2 File(s) 159 bytes Directory of G:\wim4\Users\swm\OneDrive\Documents 12/13/2023 04:18 PM <DIR> ... . 12/13/2023 04:18 PM <DIR> ... .. 272 ..:${3D0CE612-FDEE-43f7-8ACA-957BEC0CCBA0}.SyncRootIdentity:$DATA 0 File(s) 0 bytes Total Files Listed: 2 File(s) 159 bytes 14 Dir(s) 2,173,868,072,960 bytes free D). I don't have OneDrive running nor syncing, so any locks the program puts on files that just happen to get copied as part of the dism command to wim the drive shouldn't be an issue. Also the $Recycle_bin and volume files also show up under mount but will disappear near the end of the dism mount command for this wim image; otherwise, I'd expect an error earilier. E). Here's a copy of the dism.log file created during the mount step. See attached log file listing. F). After erroring from the mount, I went and tried to delete whatever remained which was some files in the Users directory structure. I've posted above what hidden files I can't delete but can't remove even at the usb boot command prompt. Since this didn't work, I then tried to unmount it and got this error. Note: I didn't save this dism.log :\>dism /Unmount-Wim /MountDir:G:\wim7 /Discard Deployment Image Servicing and Management tool Version: 10.0.19041.844 Image File : G:\MyInstallnew9.wim Image Index : 1 Unmounting image [==========================100.0%==========================] Error: 0xc1420117 The directory could not be completely unmounted. This is usually due to applications that still have files opened within the mount directory. Close these files and unmount again to complete the unmount process. The DISM log file can be found at X:\windows\Logs\DISM\dism.log **Thus**, I assume its the OneDrive with its hidden files that is causing it to think files are opened although onedrive isn't runing in task bar or synching. ------------------------------------ The same issues for my other non-OS partitions that contains my isntalled tools and data files on another partition. It will error out with code 5 and delete everything in the directory except for Users directory structure. However, I can delete recursively everything in this directory since it doesn't have OneDrive and its empty. To make sure I ran dism unmount for this directory and it completed successfully as expected since it doesn't have any files to unmount. So how to fix the mount issue and delete leftover files that won't delete, I presume if this is resolved, then the unmount error will work.
     
    swegmike, Mar 17, 2024
    #4
Thema:

How to mount wim file with DISM?

Loading...
  1. How to mount wim file with DISM? - Similar Threads - mount wim file

  2. How to mount wim file with DISM?

    in Windows 10 Gaming
    How to mount wim file with DISM?: I am trying to mount a wim file to customize the windows 11 installation. I downloaded the Windows 11 Media creation tool and created a usb key with it. I noticed the usb key had 2 swm files. I don't know if you can mount 2 swm files. I would prefer to mount 2 swm files...
  3. Data WIM using DISM

    in Windows 10 Software and Apps
    Data WIM using DISM: Dear Support Team,Can anyone guide me how to add Data Wim in Answer file using Windows System Image Manager Windows 10 with real life example. I was able to create Data Wim using DISM but got stuck at further steps....
  4. Data WIM using DISM

    in Windows 10 Gaming
    Data WIM using DISM: Dear Support Team,Can anyone guide me how to add Data Wim in Answer file using Windows System Image Manager Windows 10 with real life example. I was able to create Data Wim using DISM but got stuck at further steps....
  5. Data WIM using DISM

    in Windows 10 Drivers and Hardware
    Data WIM using DISM: Dear Support Team,Can anyone guide me how to add Data Wim in Answer file using Windows System Image Manager Windows 10 with real life example. I was able to create Data Wim using DISM but got stuck at further steps....
  6. Mount image with dism

    in Windows 10 Network and Sharing
    Mount image with dism: Keep getting this errorC:\WINDOWS\system32>dism /mount-image "/imagefile:C:\iso_files\sources\install.wim /index:6 /MountDir:C:\test\offline Deployment Image Servicing and Management tool Version: 10.0.19041.844 Error: 87 The command-line is missing the /mountdir option. For...
  7. DISM error(syntax incorrect) when trying to mount WIM files..

    in Windows 10 Performance & Maintenance
    DISM error(syntax incorrect) when trying to mount WIM files..: I get this error every time when i try mounting files using DISM, Code: The filename, directory name or Volume label syntax is incorrect.[/quote] earlier there was a problem regarding wimmount.sys driver not found whose path was changed due to Macrium Reflect Free, i...
  8. Mounting a windows 10 Wim file using DISM command in command prompt

    in Windows 10 Customization
    Mounting a windows 10 Wim file using DISM command in command prompt: Hii, I am facing error while mounting windows 10 Wim file using DISM. The error i am getting is Error:5 Access is denied The DISM log file can be found at C:\windows\Logs\DISM\dism.log I have attached the screen shot of the command prompt. Kindly provide any...
  9. Edit registry on a mounted wim

    in Windows 10 Customization
    Edit registry on a mounted wim: Can anybody tell me how to modify the registry on a mounted wim? I keep getting Access denied. This is the command I am using: reg load hkey_local_machine\software c:\test\offline\windows\system32\config\software We have Windows 10 64 bit Enterprise edition. 92826
  10. DISM captures a 17GB wim file. Yet it's only 3.7GB when mounted!???

    in Windows 10 Installation and Upgrade
    DISM captures a 17GB wim file. Yet it's only 3.7GB when mounted!???: ​I volunteer at a local community center. It has an Open Computer Lab for the public. It has An HP Server (Server 2012 R2). It’s a domain controller supporting Folder Redirection and Roaming Profiles 20 PCs (Windows 10 Pro v1511) but being upgrade to v1607. No hurry to get...