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.)

Limitations

  • 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

  1. Mount your Windows installation media.

  2. Copy sources\install.wim to your local PC. The examples below use C:\sources\install.wim as the location of the copied file.

  3. Split the Windows image:

    Dism /Split-Image /ImageFile:C:\sources\install.wim /SWMFile:C:\sources\install.swm /FileSize:4700
    

    where:

    • C:\sources\install.wim is the name and the location of the image file that you want to split.
    • C:\sources\install.swm is 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.
    • 4700 is 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 C:\sources folder.

USB deployment

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.swm command. 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.

DVD deployment

  1. Copy the .swm files to individual DVDs.

  2. Boot your destination PC to Windows PE from DVD

    From Windows PE, you can either deploy using Windows Setup or a script.

  3. Configure and format your hard drive partitions, as shown in Capture and Apply Windows, System, and Recovery Partitions.

  4. 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.

  5. 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.

      D:\Setup.exe /InstallFrom:"C:\TempInstallFolder\install.swm"
      
    • Use a script

      1. 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:\
        
      2. Set up your system and recovery partitions, as shown in Deploy Windows using a Script.

  6. Clean up: remove the temporary folder

    rd c:\TempInstallFolder /s /q