WIM file(including ~300,000 files within) mounted through Windows 'DISM' utility, results in corrupted/unreadable data

ajay.shinde 40 Reputation points
2026-08-21T04:47:35.1833333+00:00

Hello All,

Using windows 'DISM' utility('dism /Capture-Image /Compress:fast /Verify' command) we captured 'D:\Temp' directory containing ~300,000 files into a WIM file.

The capture and mounting('dism /Mount-Image') processes completed without errors. However, after mounting when we tried to open some files we observed it is corrupted or won't open, though the directory structure remains visible.

  1. Is this behaviour expected? Does the DISM has any known limitations for capturing ~300,000 files.
  2. Any specific flags are required to be used while issuing capture or mount commands. This is in order to properly support high-count file structures.

Note: We have tried 'dism /Capture-Image /Compress:fast /CheckIntegrity' as well to capture ~300,000 files. However after mounting files were still corrupted or not able to open.

Please suggest, thank you.

Ajay Shinde

Windows for business | Windows Client for IT Pros | Devices and deployment | System management components
0 comments No comments

1 answer

Sort by: Newest
  1. Domic Vo 32,140 Reputation points Independent Advisor
    2026-08-21T09:07:24.13+00:00

    Hello Ajay,

    what you are seeing is not expected behavior in the sense of “normal corruption,” but it is a known limitation of using DISM to capture very large file sets into a WIM. DISM’s /Capture-Image is designed primarily for operating system deployment images, not for arbitrary high‑count file archives. When you push it to hundreds of thousands of small files, the WIM container can technically hold them, but the capture and mount process stresses the metadata tables and can result in inaccessible or corrupted files after mounting.

    There is no fragmentation threshold or special flag that changes this behavior. /Compress:fast and /CheckIntegrity only affect compression and validation of the WIM structure, not the reliability of file capture at scale. The corruption you observed after mounting is consistent with hitting the practical limits of DISM’s WIM implementation. Microsoft does not document a hard cap, but in practice once you exceed ~100,000 files in a single capture, reliability issues become more likely.

    If your requirement is to preserve a directory tree with hundreds of thousands of files, the recommended approach is to use WIM API‑based tools such as wimgapi.dll or third‑party utilities built on it, or to switch to VHD/VHDX capture with disk2vhd or native Hyper‑V tooling. A VHDX image will preserve the NTFS structure without stressing the WIM metadata. For deployment scenarios, Microsoft’s guidance is to keep WIMs limited to OS and application payloads, not massive file archives.

    To confirm whether the corruption is happening at capture or mount, you can run dism /Get-WimInfo /WimFile:<path> and then dism /Export-Image to a new WIM. If the corruption persists after export, the capture itself was incomplete. If the export is clean, the mount driver is failing under load. In either case, the root cause is the scale of the file set.

    I hope you've found something useful here. If it helps you get more insight into the issue, it's appreciated to accept the answer. Should you have more questions, feel free to leave a message. Have a nice day!

    Domic Vo.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.