Introduction
Windows Imaging Format (WIM) is a versatile disk image format used to capture and apply image configurations in Windows operating systems. One of the essential features of WIM files is their ability to store disk addresses, which are crucial when creating and applying partitions using tools like Dism. In this article, we will explore the concept of WIM file disk addresses, their significance, and how to create and apply partitions using Dism.
What are WIM File Disk Addresses?
WIM file disk addresses refer to the mapping of physical or virtual disks to their respective images within a WIM file. When you capture a disk image using tools like ImageX or the Windows System Image Manager, the software records the disk addresses along with the image data. These addresses are essential when applying the image to a target system, as they determine which partitions and volumes to use.
Creating a WIM Image with Partitions using Dism
Prerequisites
Before you begin, ensure that you have the following:
- A source disk or partition to capture.
- Windows 10 or later with the Deployment Image Servicing and Management (Dism) tool installed.
Steps
To create a WIM image with partitions using Dism:
- Open an elevated command prompt by pressing
Win + Xand selectingCommand Prompt (Admin). - Navigate to the folder where you want to save the WIM file using the
cdcommand. - Create a new WIM file using the
Dism /Capture-Imagecommand. For example:Dism /Capture-Image /SourceDir:C:\source /DestinationFile:C:\output\myimage.wim /Name:"My Image" /SaveAll /Compress:MaxReplace
C:\sourcewith the path to the source disk or partition andC:\output\myimage.wimwith the desired output file name and path.
Applying a New Partition to an Existing WIM Image using Dism
Prerequisites
Before you begin, ensure that you have:
- A WIM file with an existing partition.
- Windows 10 or later with the Deployment Image Servicing and Management (Dism) tool installed.
Steps
To apply a new partition to an existing WIM image using Dism:
- Open an elevated command prompt by pressing
Win + Xand selectingCommand Prompt (Admin). - Mount the WIM file using the
Dism /Apply-Imagecommand. For example:Dism /Apply-Image /ImageFile:C:\output\myimage.wim /Index:1 /ApplyDir:C:\mountReplace
C:\output\myimage.wimwith the path to the WIM file andC:\mountwith the desired mount point. - Create a new partition using the
Diskparttool. For example:Diskpart Select Disk 0 Clean Create Partition Primary Format Quick Fs=NTFS Label="New Partition" Assign Letter=Z ExitReplace
Disk 0with the number of your target disk andLabel="New Partition"with the desired partition label. - Mount the new partition using the
Mountvolcommand. For example:Mountvol Z:\ - Copy the files you want to apply to the new partition to the mounted partition. For example:
Copy *.* Z:\ - Unmount the new partition using the
Mountvolcommand. For example:Mountvol Z:\ /D - Commit the changes to the WIM image using the
Dism /Unmount-Imagecommand. For example:Dism /Unmount-Image /MountPoint:C:\mount /Commit
In this article, we explored the concept of WIM file disk addresses and their significance when creating and applying partitions using Dism. We covered the steps to create a new WIM image with partitions and apply a new partition to an existing WIM image. For further reading, we recommend the following resources: