Capture and utilise a Windows image using a unmarried .WIM file

Capture a Windows image (.WIM) file and employ it to deploy Windows to new devices.

You can start with either the install.wim file from a Windows distribution ISO, or you lot can generalize and capture a running Windows image into a .WIM file.

WIM files merely capture a single partition. You can unremarkably capture but the Windows sectionalization, and then use files from that prototype to set up the rest of the partitions on the bulldoze. If yous've created a custom sectionalization configuration, run across Capture and Apply Windows, System, and Recovery Partitions.

Diagram showing a new computer with an empty hard drive, plus a single .wim image file, expands to become multiple configured partitions

Capture the image

  1. If you've booted into Windows, generalize the epitome so that it tin can exist deployed to other devices. For more than information, run across Sysprep (Generalize) a Windows installation.

  2. Boot the device using Windows PE.

  3. Optional Optimize the paradigm to reduce the time it takes your device to boot afterwards you apply the image. Optimizing an image especially helps when you're building an image that you'll be deploying to many machines, like in a build-to-stock scenario.

                      DISM /image:C:\ /optimize-image /boot                                  
  4. Capture the Windows segmentation. For case:

                      Dism /Capture-Epitome /ImageFile:"D:\Images\Fabrikam.wim" /CaptureDir:C:\ /Name:Fabrikam                                  

    Where D: is a USB wink drive or other file storage location.

Apply the image

  1. Boot the device using Windows PE.

  2. Wipe the difficult drive and set up new hard disk partitions using a script. Use CreatePartitions-UEFI.txt (or CreatePartitions-BIOS.txt for older, legacy BIOS devices).

                      diskpart /s CreatePartitions-UEFI.txt                                  
  3. Apply the images using a script.

                      D:\ApplyImage.bat D:\Images\Fabrikam.wim                                  

Sample script

Below is an unproblematic sample script that applies an image to a disk that's been partitioned using one of the hard disk partitioning scripts from pace 2.

              rem == ApplyImage.bat ==  rem == These commands deploy a specified Windows rem    image file to the Windows partitioning, and configure rem    the arrangement division.  rem    Usage:   ApplyImage WimFileName  rem    Example: ApplyImage Due east:\Images\ThinImage.wim ==  rem == Set high-functioning power scheme to speed deployment == phone call powercfg /southward 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c  rem == Utilise the paradigm to the Windows segmentation == dism /Apply-Image /ImageFile:%ane /Index:1 /ApplyDir:W:\  rem == Re-create boot files to the Organization partition == Westward:\Windows\System32\bcdboot West:\Windows /s S:  :rem == Copy the Windows RE epitome to the :rem    Windows RE Tools partition == doc R:\Recovery\WindowsRE xcopy /h W:\Windows\System32\Recovery\Winre.wim R:\Recovery\WindowsRE\  :rem == Register the location of the recovery tools == W:\Windows\System32\Reagentc /Setreimage /Path R:\Recovery\WindowsRE /Target W:\Windows  :rem == Verify the configuration status of the images. == West:\Windows\System32\Reagentc /Info /Target W:\Windows                          

Deploy Windows using Total Flash Update (FFU)

Capture and Employ Windows, System, and Recovery Partitions

Configure UEFI/GPT-Based Hard Drive Partitions

Configure BIOS/MBR-Based Hard Drive Partitions

BCDboot Control-Line Options

REAgentC Control-Line Options