Rip A Windows 7/8 Image That's Been Sysprepped Using WinPE4.0 And DISM

An article I wrote a while back at Overclock.Net. I am not sure if it's any good anymore, but have at it!

To begin with, you need downloaded and installed: Windows ADK.

WinPE4 & DISM make this so much easier now, and support such a large variety of machines out of the box that it made me less Raging for the first time in a very long time. No need for 3rd party tools or guides (unless you get extremely fancy), straight from Microsoft (all of this material is straight from MS in fact.)

Guide to WinPE USB Creation:

Once ADK is also installed, you will want those deployment tools from its folder on the External.

They are found here:
C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Deployment Tools

Copy the Deployment Tools folder to your external drive and name it something you will remember, since this is the core of WADK tools, I named my copied folder WADK.

Recommended Tools Before Beginning
  1. An OS that has already been Sysprepped/Unattended prepared!
  2. 2~4GB Flash Drive (Since it is usually FAT32, you don’t want to store your 4GB+ file sized image here so just use it for booting PE4.)
  3. External Drive (or another Internal Drive for storing the image to be ripped.)


Boot to the USB WinPE4.0 after your OS has been sysprepped. If you have successfully created a bootable flash drive via the first guide, you should be sitting at a pretty CMD in fast and sexy WinPE4.0. This should be the default directory you are looking at after it is finished loading:

From here, we need to see what WinPE has done about labeling your drives and partitions.
select disk 0
list partition
select partition 0 //only if you use a system partition
assign letter="S" //S for System
select partition 1 //again, would be 0 if there is no partition ahead of this
assign letter="W" //W for Windows
list volume // Look for you external HDD and remember the Drive letter assigned or change it yourself
Now that we have labeled your drives something recognizeable, we then navigate to the WADK folder on your external drive, using the drive letter you just looked up. Mine was assigned to L. Change root:
Navigate to DISM folder inside of the WADK copy you made:

Capturing the Image!

Since your OS is already sysprepped and ready to go, you simply capture the correct partition / drive mount
Dism /Capture-Image /ImageFile:L:\WinImg.wim /CaptureDir:W:\ /Name:"Windows"
Alternatively using UNC and Domain:
net use Z: \\ServerName\SharedFolder /user:domain\user PASSWORD
Dism /Capture-Image /ImageFile:Z:\MyImages\WinImg.wim /CaptureDir:W:\ /Name:"Windows"

Applying a Captured Image

Disk Preparation
select disk 0
create partition primary size=100
format quick fs=ntfs label="System"
assign letter="S"
create partition primary
format quick fs=ntfs label="Windows"
assign letter="W"
S:\ Is the 100mb system partition which stores boot info.
W:\ Is the Windows partition.
Whatever drive the Ext HDD is (L:\ for example), navigate to the DISM folder.


(If you need to find out what drive letter the external hard drive is use DISKPART followed by the “List Volume” command, the “L:” is just the standard way of changing the root drive letter you are working for. You don’t CD L: or CD Q: to change drives, you simply type the drive letter with a colon.)

Apply Windows Image

dism /apply-image /imagefile:L:\WinImg.wim /index:1 /ApplyDir:W:\
L:\Directory to Image\ImageFile.WIM, the above Images were just stored on the root of the drive.
Upon fully imaging the drive, you want to create correct boot drive options.

Return to RAM DISK X:\ by typing:
Should return you to X:\Windows\System32. If not navigate there with CD. Then run BCDBOOT as such:
bcdboot W:\Windows /l en-US

It will automatically apply to S:\ because of the label. (If it fails for whatever reason you may force application to S drive by using /S S: ) After this it should be good to go and boot the OS.

Sources of Information & Other seriously useful DISM links:
What is Sysprep?
Capturing images with DISM
Applying images with DISM
BCBOOT Command Line Options
Mounting an image and editing files inside it

Note all of this use to be done with a combination of DISM before and ImageX. ImageX is officially deprecated and DISM now retains all functionality and more.