How to Manually Create a WIM File of a Pre-Configured Workstation

How to Manually Create a WIM File of  a Pre-Configured Workstation

 In SCCM and many other distribution applications, you may directly import a WIM file for deployment of an operating system or corporate image.  A WIM file is all of the mass data of a Windows OS and is found on all installation media as well.  Usually, it is a file named install.wim.  The below document will show you how to turn a workstation with an image you wish to deploy into a WIM file.


  • x1 – Windows 7 workstation configured to your specifications
  • x1 – Bootable WinPE USB Drive or Disc
  • x1 – External Hard Drive

Prepare Workstation

To be performed on the workstation whose configuration you want deployed

  1. Make all customizations and install all applications until you have the workstation exactly as you want it
  1. Disjoin the workstation from a domain if it is currently a member of one
  1. Optional – Create a backup before proceeding

Sys-prepping the Workstation

  1. On the workstation, run “c:\windows\system32\sysprep\sysprep.exe” Choose to enter “Audit Mode”, uncheck “Generalize”, choose “Reboot”, then click OK. The machine will reboot and come back up to the desktop without prompting for credentials.
  1. Make final changes you wish to perform. This may include deleting temporary local accounts and their matching local profiles.
  1. Once ready, run “c:\windows\system32\sysprep\sysprep.exe” again. This time, choose “Enter Out of Box Experience”, check “Generalize”, and choose “Shutdown.”  Click OK to proceed.

Capturing WIM File

  1. Plug in or insert your WinPe drive as well as the external USB drive. Turn on the computer and boot to the Windows PE USB drive or disc.  If you miss the prompt and it starts loading Windows, you must go through Windows Initial Configuration then start at step 4 again.  Once complete, you should be at a command prompt.
  1. Find out what devices have what driver letters and list them below. The easiest way to do this is to run a “dir” command on each drive letter and match its contents.
  • WinPE Media Drive Letter:
  • Workstation’s Hard Drive Letter:
  • External USB Drive Letter:

For the rest of this guide, we will assume that the WinPE media is E:, the Workstation Drive is D:, and the External USB Drive is F:

  1. Run the following command. Make sure you substitute the drive letters you noted appropriately

 “E:\imagex /compress fast /check /flags “Professional” /capture D: F:\install.wim “Windows 7 Professional” “Windows 7 Professional Custom”

 If entered correctly, the workstation’s OS will immediately start to compress into “install.wim” onto your External USB Drive. All custom or user specific files will not be included such as recycle bin files or page files.  After a few seconds, you will be given an estimate as to how much time is remaining for the capture.

  1. Once complete, you will be back at a command prompt. The install.wim file is now complete and created on your external drive.  Rebooting the workstation will start the Initial Windows Installation Wizard.

Examples of What Can You Do With a WIM File

  • Import into SCCM or other distribution application for deployment
  • Create Installation Media – Extract a Windows 7 OEM ISO to a temp folder. Once extracted, replace the install.wim in its “sources” folder with the install.wim you made.  You may then copy the extracted contents to a bootable USB drive or recreate an ISO file.
  • When Windows is installed from that custom installation now, it will have all of your changes and applications installed already!

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>