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
These steps require you to have the Windows Assessment and Deployment kit and WinPE add-on installed on your PC.
Open a Command prompt as administrator.
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
Copy the WinPE files to the WinPE partition:
copype amd64 C:\WinPE_amd64 Makewinpemedia /ufd C:\WinPE_amd64 P:
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:
- Boot to WinPE.
- After WinPE has fully booted, remove the WinPE USB drive.
- 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
Copy the image to a server on your network, for example, \\server\share\install.wim
Boot to WinPE.
Connect a network drive using a drive letter, for example, N.
net use N: \\server\share
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.
- 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.
From your technician PC, create your WinPE key. See WinPE: Create USB Bootable drive.
Open a Command prompt as adminstrator.
Split the Windows image into files smaller than 4GB each:
Dism /Split-Image /ImageFile:C:\install.wim /SWMFile:C:\images\split\install.swm /FileSize:4000
C:\images\install.wimis the name and the location of the image file that you want to split.
C:\images\split\install.swmis the destination name and the location for the split .wim files.
4000is the maximum size in MB for each of the split .wim files to be created.
In this example, the
/splitoption creates an install.swm file, an install2.swm file, an install3.swm file, and so on, in the
Copy the files to the WinPE key.
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:\