Deploy WIMBoot Images: If you know the size of the images upfront

In this article

Deploy Windows image file boot (WIMBoot) on new PCs using the images you created in Create WIMBoot Images.

WIMBoot helps you save hard drive space by booting to a WIM file rather than a set of uncompressed Windows files.

To deploy Windows, you'll need to configure the hard drive partitions with the Images partition at the end of the drive, containing the Windows image file, the Windows RE image file, and if included, an image file for final customizations (custom.wim).

The following diagram shows this configuration.

The final customizations in the custom.wim file may include Windows updates, build-to-order apps and drivers, or other changes that typically happen on the factory floor. This means you don't have to recapture these updates into the fully-loaded install.wim. This change can potentially save time during the manufacturing process.

Do not preload traditional system recovery tools, because they won’t be able to restore a PC with the WIMBoot configuration. Instead, use the built-in push-button reset tools, which you can configure automatically by using the procedures on this page.

Prerequisites

Prepare a WIMBoot image (install_wimboot.wim) and separate out the Windows RE image (winre.wim). For more info, see Create WIMBoot Images.

Create a Windows PE 5.1 bootable drive by adding the Windows 8.1 Update packages to Windows PE 5.0, and then cleaning up the image. For more info, see Update WinPE 5.0 to WinPE 5.1.

Format the drive with the WIMBoot partition layout

Boot the reference PC into Windows PE 5.1.

Format the drive using the following partition layout:

System (EFI System Partition): Size: 100MB.

If the primary drive is less than 16GB, you can use a minimum size of 32MB.

If the primary drive is an Advanced Format 4K Native drive (4-KB-per-sector), the minimum size is 260 MB.

Size: Must be big enough to hold install.wim, winre.wim, and custom.wim files plus at least 50 MB of free space.

Note

If you plan to make changes on the factory floor in the custom.wim file, be sure to leave enough space for these additions. But try not to add too much free space, especially on devices with limited drive space, because this partition can’t be resized after you've added files to it.
To work around this problem, you can set up this Images partition later. For more info, see Deploy WIMBoot Images: If you don't know the size of the images upfront.

Sample Diskpart script

The script temporarily assigns these drive letters: Windows=C and Images=M. If you’re deploying to PCs with unformatted hard drives, you might want to modify this script to use a drive letter that’s near the end of the alphabet, such as W, to avoid drive letter conflicts. Do not use X, because this drive letter is reserved for Windows PE. After the PC reboots, the Windows partition is assigned the letter C, and the other partitions don’t receive drive letters. We've added volume names to the partitions, but they aren’t required.

Apply the Windows image to the Windows partition (drive C), using the /WIMBoot option.

Recommended: create a temporary scratch folder for DISM to avoid issues related to short file names. To prevent capturing the DISM logs in your image, choose a location that is in your DISM Exclusion list. For more info, see DISM Configuration List and WimScript.ini Files.

When you use the DISM /Apply-Image command with the /WIMBoot option, the ImageFile location and ApplyDir partition must be on the same hard drive.

When you apply the Windows image using /WIMBoot, DISM adds pointer files from the Windows partition to the Images partition. These pointer files make the PC appear and function as if the Windows files were stored on the Windows partition. But they still primarily reside inside the install.wim file in the Images partition. Do not remove the install.wim file after applying the image.

Create boot files and set them to boot to the Windows partition.

C:\Windows\System32\bcdboot C:\Windows

Copy the Windows RE file to the Images folder. Note that Winre.wim may be a hidden file. Use robocopy or xcopy to copy the file. In this example, the "echo f" command suppresses the xcopy "File or Directory" prompt:

If your partition configuration is different from the recommended configuration listed above, create a ResetConfig.xml file and include it in the M:\Windows Images\ folder to enable your users create bare metal recovery media. For more info, see ResetConfig XML Reference.

Add final customizations, such as build-to-order apps, drivers, or Windows updates.

Prepare the PC to boot into OOBE mode, and shut down the PC.

Recommended: Generalize the image to optimize the push-button reset features. If you do this, we recommend that you boot the PC once after the Images partition is created in order to speed up the OOBE process. For more info, see Perform final reboot.

C:\Windows\System32\Sysprep\Sysprep /OOBE /shutdown /generalize

Reboot the PC into Windows PE 5.1.

Check to make sure you have enough room on the Images partition to capture the changes. If you've made it this far and there's not room, you might have to go back to the beginning of this page.

When you capture the custom image, DISM captures the incremental file changes (based on the specific install.wim file) to a new file, custom.wim, and converts these files to pointer files. The custom.wim is placed in the same folder as install.wim.

Don’t copy custom.wim to other PCs. Custom.wim is not intended as a replacement for modifying the primary install.wim file.

Don’t switch out the install.wim file after creating custom.wim.

Don't remove or re-capture custom.wim after capturing the incremental file changes. If you do need to modify the factory floor customizations, restart the process from the beginning of this page, including reformatting the entire drive.

Remove the scratch folder.

rd C:\Recycler /s /q

Protect the WIMBoot folders and prepare the PC for OOBE

Protect the Windows images partitions by setting them as read-only. Run these steps from an elevated command prompt:

Perform final reboot

Recommended: If you generalized the image when performing the factory floor customizations, allow the PC to boot up once to Windows in order to speed up the first boot experience for the end user. After the PC reaches the OOBE screen, you can safely turn off the PC without shutting it down.

Optional: Validate your WIMBoot deployment

Boot to Windows PE.

Temporarily assign drive letters to the Windows and Images partitions, and verify that the System, MSR, Windows, and Images partitions exist and are in the prescribed order.

If the push-button recovery process fails, make sure that you've updated both the Windows and the Windows RE images to include the Windows 8.1 Update. For more info, see Install the Windows 8.1 Update for OEMs.