Split a Windows image file (.wim) to span across multiple DVDs
Split a Windows image (.wim) file into a set of smaller (.swm) files when you're installing Windows from media that can't handle the Windows image file size, for example:
- DVDs (A standard single-sided DVD stores 4.7GB).
- USB keys formatted as FAT32. FAT32 is required to boot many modern (UEFI-based) PCs, but has a maximum file size of 4GB. (Workaround: Create a USB key with multiple partitions.)
- You can’t modify a set of split image (.swm) files.
- Applying split image (.swm) files is only supported when all of the .swm files are in the same folder. This means for DVD deployment, you'll need to copy the files over to the destination PC before you can use Windows Setup or DISM /Apply-Image, as shown in this topic.
Split the file
Mount your Windows installation media.
sources\install.wimto your local PC. The examples below use
C:\sources\install.wimas the location of the copied file.
Split the Windows image:
Dism /Split-Image /ImageFile:C:\sources\install.wim /SWMFile:C:\sources\install.swm /FileSize:4700
C:\sources\install.wimis the name and the location of the image file that you want to split.
C:\sources\install.swmis the destination name and the location for the split .swm files. The first split .swm file will be named install.swm. The file names for the next files include numbers, for example, install2.swm file, install3.swm file, and so on.
4700is the maximum size in MB for each of the split .swm files to be created.
You'll now have a set of install.swm files in the
Copy all of the .swm files in the same folder on the USB key:
- If you're deploying your image from WinPE, you can copy the .swm files into any folder and use DISM with the
/apply-image /imagefile:install.swm /swmfile:install.swmcommand. See Apply-image for more information.
- If you're installing from Windows Setup, copy the set of .swm files into the Sources folder on the installation media and then run Windows Setup.
Copy the .swm files to individual DVDs.
Boot your destination PC to Windows PE from DVD
From Windows PE, you can either deploy using Windows Setup or a script.
Configure and format your hard drive partitions, as shown in Capture and Apply Windows, System, and Recovery Partitions.
Copy the files to a single temporary folder. For example, insert the first DVD and type:
md C:\TempInstallFolder copy d:\install.swm c:\TempInstallFolder\*
Then insert the second DVD and type:
copy d:\install2.swm c:\TempInstallFolder\*
And so on until all .swm files are copied.
Install using Windows Setup or a script.
Windows Setup: Boot from Windows installation media into Windows Setup, and use it to install the split Windows image files.
Use a script
Apply your image using the DISM /Apply-Image /SWMFile option:
Dism /Apply-Image /ImageFile:C:\TempInstallFolder\install.swm /SWMFile:c:\TempInstallFolder\install*.swm /Index:1 /ApplyDir:D:\
Set up your system and recovery partitions, as shown in Deploy Windows using a Script.
Clean up: remove the temporary folder
rd c:\TempInstallFolder /s /q