WinPE: Store or split images to deploy Windows using a single USB drive

If your PC only has one USB port, you can still deploy Windows

The default Windows Preinstallation Environment (WinPE) drive format, FAT32, is used to boot UEFI-based PCs. FAT32 has limitations that you'll have to work around when working with most Windows images:

  • FAT32 has a maximum file size of 4GB in size. Most customized Windows images are over 4GB.

  • FAT32 has a maximum partition size of 32GB. Some Windows images are larger than 32GB.

    (You can still use a 64GB or 128GB USB key, but you have to format it to use only uses 32GB of its space.)

Below are several ways to work around these limitations.

Option 1: Create a multiple partition USB drive

You can create multiple partitions on USB drives. To work with a USB drive with multiple partitions, both your technician PC and WinPE have to be Windows 10, Version 1703, or later.

Create a USB drive with WinPE and data partitions

Note

These steps require you to have the Windows Assessment and Deployment kit and WinPE add-on installed on your PC.

  1. Open a Command prompt as administrator.

  2. Run Diskpart:

    diskpart
    
  3. Use Diskpart to reformat the drive and create two new partitions for WinPE and for your images:

    List disk
    select disk X    (where X is your USB drive)
    clean
    create partition primary size=2048
    active
    format fs=FAT32 quick label="WinPE"
    assign letter=P
    create partition primary
    format fs=NTFS quick label="Images"
    assign letter=I  
    Exit
    
  4. Copy the WinPE files to the WinPE partition:

    copype amd64 C:\WinPE_amd64
    Makewinpemedia /ufd C:\WinPE_amd64 P:
    
  5. Copy your Windows image file to the Images partition:

    xcopy C:\Images\install.wim I:\install.wim
    

Option 2: Store the image on a separate USB drive

If your PC only has one USB port, you can deploy Windows using two separate USB keys:

  1. Boot to WinPE.
  2. After WinPE has fully booted, remove the WinPE USB drive.
  3. Plug in a separate storage drive with your image and apply it to the device.

Option 3: Apply an image that's stored on a network location

  1. Copy the image to a server on your network, for example, \\server\share\install.wim

  2. Boot to WinPE.

  3. Connect a network drive using a drive letter, for example, N.

    net use N: \\server\share
    
  4. Apply the image from the network.

    Dism /apply-image /imagefile:N:\install.wim /index:1 /applydir:D:\
    

Option 4: Split the image

You can split a .wim file into smaller files that will be combined when you apply your image to a device.

Limitations:

  • Applying split image (.swm) files is only supported when all of the .swm files are in the same folder, as shown in these steps.
  • You can't modify a split .wim file.
  • When using a FAT-32 drive, you can format it to only use 32GB of space.
  • For images larger than 32GB, you need a second USB key because of the FAT32 partition size limitation.
  1. From your technician PC, create your WinPE key. See WinPE: Create USB Bootable drive.

  2. Open a Command prompt as adminstrator.

  3. Split the Windows image into files smaller than 4GB each:

    Dism /Split-Image /ImageFile:C:\images\install.wim /SWMFile:C:\images\split\install.swm /FileSize:4000
    

    where:

    • C:\images\install.wim is the name and the location of the image file that you want to split.
    • C:\images\split\install.swm is the destination name and the location for the split .wim files.
    • 4000 is the maximum size in MB for each of the split .wim files to be created.

    In this example, the /split option creates an install.swm file, an install2.swm file, an install3.swm file, and so on, in the C:\Images directory.

  4. Copy the files to the WinPE key.

  5. On the destination PC, boot to WinPE, and then apply the image using DISM /Apply-Image with /ImageFile and /SWMFile options, as shown:

    Dism /Apply-Image /ImageFile:C:\images\split\install.swm /SWMFile:C:\images\split\install*.swm /Index:1 /ApplyDir:D:\
    

WinPE: Identify drive letters with a script

Split a Windows image file (.wim) for FAT32 media or to span across multiple DVDs

DISM Image Management Command-Line Options