For pushing small changes to an existing wim image, you can significantly reduce network traffic by using the previous wim file as a base wim and a file that contains only the "changes" as the main wim.

wimlib is an open source library for playing with wim files, and it has an awesome feature to make doing creating these "changes-only" wim files. You just do:

.\wimlib-imagex.exe capture <folder_to_capture> <output.wim> --delta-from=<base.wim>

The result is a tiny output.wim that has only metadata and the files that differ from base.wim. You can then apply the image, even with Microsoft's tools, as so:

Expand-WindowsImage -ImagePath <output.wim> -Index 1 -ApplyPath `
<output_folder> -SplitImageFilePattern <base.wim>

Two questions:

  1. Do Microsoft's first-party imagex/dism tools offer any way to get the same functionality (just so I can avoid adding another dependency if possible)? They offer splitting an existing wim into pieces, but I don't see anything to help create a "delta" type wim from a folder/wim and a base wim.

  2. If not, are there any issues I should be aware with when using wimlib? My use case is capturing and applying images via Microsoft's Deployment Toolkit. I see wimlib does not support NTFS extended attributes yet, but MDT does not capture those as far as I can tell.


Question 1:



There are no delta capture option(s) available according to the documentation out at Microsoft Docs: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/deployment-image-servicing-and-management--dism--command-line-options

Dism /Capture-Image /ImageFile:<path_to_image_file> /CaptureDir:<source_directory> /Name:<image_name> [/Description:<image_description>]
[/ConfigFile:<configuration_file.ini>] {[/Compress:{max|fast|none}] [/Bootable] | [/WIMBoot]} [/CheckIntegrity] [/Verify] [/NoRpFix] [/EA]

Parameter   Description
/ConfigFile Specifies the location of a configuration file that lists exclusions for image capture and compress commands. For more information, see DISM Configuration List and WimScript.ini Files.
/Compress   Specifies the type of compression used for the initial capture operation. The maximum option provides the best compression, but takes more time to capture the image. The fast option provides faster image compression, but the resulting files are larger than those compressed by using the maximum option. This is also the default compression type that is used if you do not specify the argument. The none option does not compress the captured image at all.
/Bootable   Marks a volume image as being a bootable image. This argument is available only for WinPE images. Only one volume image can be marked as bootable in a .wim file.
/CheckIntegrity Detects and tracks .wim file corruption when used with capture, unmount, export, and commit operations. /CheckIntegrity stops the operation if DISM detects that the .wim file is corrupted when used with apply and mount operations.
/Verify Checks for errors and file duplication.
/NoRpFix    Disables the reparse point tag fix. A reparse point is a file that contains a link to another file on the file system. If /NoRpFix is not specified, reparse points that resolve to paths outside of the value specified by /ImageFile will not be captured.
/WIMBoot    Use /WIMBoot to append the image with Windows image file boot (WIMBoot) configuration. This only applies to Windows 8.1 images that have been captured or exported as a WIMBoot file. This feature isn't supported in Windows 10.
/EA New in Windows 10, version 1607. Captures extended attributes. The switch must be explicitly specified to capture extended attributes. DISM will capture extended attribute bits if they are set in the components to be captured in the WIM image. If the bits are not set, DISM won't set them. Only the inbox components of CAB packages and drivers will have these extended attribute bits, not the AppX package components or Win32 application components. Extended attributes with prefix “$Kernel.” in name will be skipped because only user mode extended attributes are captured. If you use DISM in Windows 10, version 1607 to capture extended attributes and use an earlier version of DISM to apply the image, the operation will succeed but the extended attributes will not be set to the applied image.

Question 2:

There are no compatibility issues from my experience.

I use WIMLib occasionally when I use Windows PE SE.

It does not cause any issues when I build a bootable live CD environment for Windows.

BCD is able to boot the images properly.

Now, those are only using the standard WIM options, I have not tried to do anything advanced with the WIM files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.