DISM Tool – WinPE 3.1 Boot Environment

windows7


This is the new tutorial for the recent release of WinPE 3.1. You can still read the old tutorial here.

You will need the following to proceed:

Once you have installed WAIK, and the WAIK supplement, then you will need to browse to your start menu and click on “Deployment Tools Command Prompt”.
DISM

Once you have launched DTCP you will need to follow through the commands I have compiled below. The first one I have provided a screenshot.

DISM – Step 1 – Prep/Cleanup

DISM /Cleanup-Wim

The DISM cleanup command simply cleans up any previous wims/mounts you have been working with. If you do this a lot, you will need to use this command otherwise you will start receiving errors from previous wims possibly still left on the system.

DISM Step #1

DISM – Step 2 – Copy WinPE 3.1 to your local C Drive

copype.cmd x86 c:\winpe_x86
copy c:\winpe_x86\winpe.wim c:\winpe_x86\ISO\sources\boot.wim 

This creates a winpe_x86 folder on your C: drive and then copies the contents of the WinPE folder from the WAIK installation to your folder.

DISM – Step 3 – Mounting .Wim File on your local C Drive

Dism /Mount-Wim /WimFile:C:\winpe_x86\winpe.wim /index:1 /MountDir:C:\winpe_x86\mount

DISM - Mounting
This command mounts the wim file that was copied over in step #2 so that you can browse the system32 folder and insert your custom scripts, etc.

DISM – Step 4 – Adding Packages to your WIM

Dism /image:C:\winpe_x86\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-wmi.cab"
Dism /image:C:\winpe_x86\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\en-us\winpe-wmi_en-us.cab"

There are many packages you can add to your WINPE boot environment, these are two I always add to mine.

DISM – Step 5 – Adding Drivers to WinPE

DISM /image:c:\winpe_x86\mount /Add-Driver /driver:C:\YOUR_FOLDER_OF_INF_DRIVERS\ /recurse

A nice addition to DISM over the previous peimg command in WINPE 2.0 is the ability to add drivers with the /recurse command. The /recurse command now allows us to simply have all of our drivers in their own directory and tell DISM to scan the root folder and everything beneath it. The number of sub directories won’t matter. I have a huge library of drivers, for example, you will want to have the network and vga drivers for anything that you boot up to in the WinPE environment. By adding the network driver to your WinPE boot environment, it allows you to access network shares for capturing and deploying .wim images.

DISM – Step 6 – Adding Custom Scripts, Batch Files, Etc.

xcopy /e /y "C:\YOUR_FOLDER_OF_SCRIPTS" C:\winpe_x86\mount\Windows\System32\

Without adding anything to your WinPE boot environment you will simply be left with a command prompt window when booting to it on a computer. I have added over 15 different batch scripts with different functions. Click here to download my WinPE discs. One thing I highly suggest adding is GImageX. GImageX is a very small GUI program that you can add to be able to capture, deploy, and mount images within the WinPE boot environment. I have provided a picture of GImageX GUI below.

For WinPE 3.1 Boot Environment - Mount, Deploy, Capture Images

DISM – Step 7 – Unmounting your finished .WIM

Dism /Unmount-Wim /MountDir:C:\winpe_x86\mount\ /Commit

This commits the final changes to your .WIM file and anything you added to it. It is very important to unmount your .WIM file when you have finished.

DISM – Step 8 – Copies your .WIM to Boot ISO

copy c:\winpe_x86\winpe.wim c:\winpe_x86\ISO\sources\boot.wim /Y

DISM – Step 9 – Creates bootable .ISO of WinPE 3.1

oscdimg -n -bc:\winpe_x86\etfsboot.com c:\winpe_x86\ISO c:\winpe_x86\winpe_x86.iso

Now, if you are wanting to use a flash stick you will need to format a flash stick in a certain way, and then simply copy the contents of the c:\winpe_x86\ISO\ to your flash drive. And thats it! Stick it in a computer, restart, and boot to it. The .ISO made in step #9 can simply be burned to a CD with Nero or other program capable of making bootable CD and then you can boot to it in the same way.

DISM – Step 10 – Optional Backup

xcopy /e /y "C:\winpe_x86" E:\BACKUP_FOLDER_FOR_LATEST_BOOT_BUILD\

This step is optional, but I always like to keep a backup for the future. Also, if you ever need to create another bootable flash stick or CD you can simply go to your backup and grab the files.

Incoming search terms:

  • winpe 3 1
  • dism error: 0xc1420117
  • dixm
  • winpe 3 1 download
  • WinPE 3 0 ISO
  • winpe 3 1 iso
  • dism capture entire drive
  • windows pe 3 0 iso
  • add drivers to winpe 3 1
  • winpe 3 0

 
  • Dave Keiner

    Meant to post this here. Is the setup the same for 64-bit or are the steps different because of compability issues? Also has anyone compiled anything for 64 bit yet?

    • Leon Chung

      Just replace x86 to amd64 where applicable and you should be fine. I just made one myself. The only difference I made was add Dell’s Windows PE drivers (which has a couple overlaps but it is fine). I grabbed it off a Latitude E4310 Windows 7 drivers page, but it includes PE drivers for Latitudes, OptiPlex and Precisions. (includes x86 and x64 drivers)

      • Dave Keiner

        Ok cool, I made one with a ridiculous amount of drivers. 10.1GB in all, but it was required to cover all of our companies across the US, Mexico, Canda, and Japan. We are about to start supporting Windows 7 Enterprise x64 and I wanted to make sure there wouldn’t be any speed bumps. We have had several different people in our department order PCs across the times, so we have bits and pieces of random junk here and there. I am trying to help them clean all that up and just stick with Dell, but we will see how it goes. We currently use ghost for most of our stuff, but I’m trying to get them into WDS on our servers.

        • http://www.smartcom.co.nz ndog37

          Do you really want to integrate 8GB of drivers into your base image?
          Why don’t you just use a script to get the drivers of your machines and then use hwids to save the machine info
          on deployment run hwids again and if they match up then use the script to pull the extracted drivers back to the local machine

  • Dave Keiner

    Another question, I wanted to start completely over due to an error I received and was unsure where to go back to. When trying to completely remove the directory it gives me an access denied error. I even tried deleting with the hidden admin account. I tried removing using RD /S {path}. Nothing is working currently. I wanted to start fresh from step 1 and begin again to find out where I made my mistake at. Email listed, please respond. Thanks.

  • http://www.theitbros.com Brian Jackson

    @Dave. I wrote this new post just for you :) http://theitbros.com/trouble-deleting-cwinpe_x86-directory Try it and see if that works.

    • Dave Keiner

      Thanks for the reply. I ended up just uninstalling WAIK and that removed the directory for me. I reinstalled it and began doing the steps. Once I get back into work tomorrow I will work on it again. Thanks for the post. I will keep note of this for future reference.

  • JosephR

    Thanks, I was able to make this work in my environment. I know my way around batch files and I have a decent menu for us to deploy from.

  • Simon Watkins

    I am receiving a 1630 error when Adding Packages. I didn’t have this problem with your WinPE 3.0 guide. This only started to happen when I added the supplement for SP1.

    Any ideas?

  • Jeff Beadle

    My issue I have is my bitmap wallpaper ends up being black in WinPE 3.0
    My winpe.bmp that I copy over from my computer to the mounted\system32 folder copies over fine. The file size is correct.
    After I unmount and save the changes to the image, I remounted it to see if my winpe.bmp was even viewable through paint.
    The winpe.bmp is now 26 bytes. I was more like 2 MB before. Everything I save in the mounted system32 folder is there and working.

    Any idea?

    • Jeff Beadle

      Fixed, changed image size from 1024×768 to 640×480.

  • sachida

    Hi itbro,
    I noticed you’ve added the script for all dell drivers, can you also assist with hp drivers? I am having issues with 8200 elite sff and loading 82579lm driver.

    • http://www.theitbros.com Brian Jackson

      I might be able to help with your HP drivers. What is the problem you are having? Are you unable to inject the INF file?

      • JJ

        I will need to, but haven’t yet, integrate the HP drivers. I think that the swsetup folder needs to be the source root, correct?

        I’ve noticed that in your scripts, but not included with your drives, there are references to the dell drivers in the driveradditions.txt… Is this essential to the driver integration process to the win7pe? I think it’s great that you’re listing what drivers are integrated but I wasn’t sure if something looks at that file to see if it is integrated.

        But I had a question: Wouldn’t it be eaiser to use something like driverpack and extract and insert into the WIM? (a speculation since it’s what I used to use for BartPE and slipstreaming updates into XP disks)

        By the way, AWESOME work on this stuff to help take out all the guesswork. I’ve read the Win 7 Resource Kit a few times and MS online for it to finally sink in a bit and then your site helped it really stick home with all this win7pe stuff.

    • JJ

      This is what I did:

      Download and execute for extraction, but cancelled installation (not on an 8200, but require the drivers)

      c:\winpe_x86>DISM /image:c:\winpe_x86\mount /Add-Driver /driver:C:\SWSetup\8200_
      NIC_SP52368 /recurse

      Deployment Image Servicing and Management tool
      Version: 6.1.7600.16385

      Image Version: 6.1.7601.17514

      Searching for driver packages to install…
      Found 15 driver package(s) to install.
      Installing 1 of 15 – C:\SWSetup\8200_NIC_SP52368\E1C6232.INF: The driver package
      was successfully installed.
      Installing 2 of 15 – C:\SWSetup\8200_NIC_SP52368\e1e6232.INF: The driver package
      was successfully installed.
      Installing 3 of 15 – C:\SWSetup\8200_NIC_SP52368\e1k6232.inf: The driver package
      was successfully installed.
      Installing 4 of 15 – C:\SWSetup\8200_NIC_SP52368\E1Q6232.inf: The driver package
      was successfully installed.
      Installing 5 of 15 – C:\SWSetup\8200_NIC_SP52368\e1r6232.inf: The driver package
      was successfully installed.
      Installing 6 of 15 – C:\SWSetup\8200_NIC_SP52368\e1y6232.INF: The driver package
      was successfully installed.
      Installing 7 of 15 – C:\SWSetup\8200_NIC_SP52368\install\DRIVERS\ANSM2KXP.INF: T
      he driver package was successfully installed.
      Installing 8 of 15 – C:\SWSetup\8200_NIC_SP52368\install\DRIVERS\ansmw60.inf: Th
      e driver package was successfully installed.
      Installing 9 of 15 – C:\SWSetup\8200_NIC_SP52368\install\DRIVERS\ANSP2KXP.INF: T
      he driver package was successfully installed.
      Installing 10 of 15 – C:\SWSetup\8200_NIC_SP52368\install\DRIVERS\anspw60.inf: T
      he driver package was successfully installed.
      Installing 11 of 15 – C:\SWSetup\8200_NIC_SP52368\install\DRIVERS\ifcoemp.inf: T
      he driver package was successfully installed.
      Installing 12 of 15 – C:\SWSetup\8200_NIC_SP52368\install\DRIVERS\ifcoepr.inf: T
      he driver package was successfully installed.
      Installing 13 of 15 – C:\SWSetup\8200_NIC_SP52368\install\DRIVERS\ifcoevb.inf: T
      he driver package was successfully installed.
      Installing 14 of 15 – C:\SWSetup\8200_NIC_SP52368\install\DRIVERS\ilp5232.inf: T
      he driver package was successfully installed.
      Installing 15 of 15 – C:\SWSetup\8200_NIC_SP52368\install\DRIVERS\ilp6032.inf: T
      he driver package was successfully installed.
      The operation completed successfully.

      I would have to conclude that if you do the same for the other drivers you need it should work.

  • Michael Valentine

    Getting Error: 1630 Data of this type is not supported. Tis happens during Step 4.

  • Eric G.

    How can I keep WinPE from cluttering up DNS with mini ___ (series of numbers & letters) entries? Could I tell it to use a range of IP’s? My DNS Admin isnt a happy camper :-)

    Thanks for the help !!
    Eric

  • Mike

    You might also want to include instructions to copy imagex.exe into the PE. It can come in handy if you want to do something from the command line.

    • Lee

      Good god this is what is what I need. Do you have this step or command so I can get it working along with it mapped properly so I can browse to other folders? This is the one thing that makes this whole thing useless to me. While using GimageX is nice, I tend to use my own scripts from the command line.

  • Scott Tucker

    Brain thanks for the great posts!
    I was wondering it there was a way to get the script with ghost still as my group still uses it. I am working on moving to imageX and MDT but we are just not their yet.

  • Carminator

    Hello, nice one your script and compilation. Bravo!
    Just one thing….do you know if we can add source for a mouse driver? and if yes how to do that? will be more easy/fast in Gimagex.

    Thanks a lot

  • alex johnson

    Hi,
    I’m very new to this set up. I like the idea of being able to create a WIM image. How do I make that available over the network. I obviously need to put a wim on a network share, just not sure how clients see that. I would also guess the bios boot be changed in order to boot to the network. I don’t like guessing so basic steps on this please.

  • Don Hudlow

    Thanks for the great walkthrough. I am imaging windows 7 Ultimate 64 bit and changed the X86 items to amd64 as stated above but on step 3 I receive an
    ERROR 13
    The data is invalid
    I’m not sure which data it is referring to
    Thanks again

  • Lee

    Hi Brian,

    For whatever reason ImageX does not work. My WinPE 3.0 without your scripts works just fine and I can run my custom batch files for capturing and deploying. However, following your instructions here I cannot get my custom scripts to run. It seems that ImageX just isn’t mapped or installed. What am I missing here? I’ve spent all day updating my process to once again run into a snag. The official MS WinPE instructions have a step to copy the ImageX executable during the creation process but I do not see that here.

  • Stuart Tottle

    Hello,
    Great article and easy to follow…
    I’m trying to create a 64-bit WinPE disk and I have followed the instructions above (substituted x86 for amd64 on all commands). The WinPE disk I created for x86 works fine.
    How do I create a bootable ISO image using the ‘oscdimg’ command and could you tell me if I need to do anything else?
    Many Thanks
    stottle

  • Martin

    When I execute step 3 I get the following error:

    Logging is disabled: Unable to obtain access to the log file C:\Windows\Logs\DIS
    M\dism.log.

    Error: 5

    Access is denied.

    I have checked the permissions of these folders and I have full write access. I also tried running the command prompt as administrator and the error is still there.

    Do you know why this is happening?

  • LTD

    Hello Brian,
    The download link for your scripts is 404ing.
    can you check the link?

  • Lachlan

    @Lee
    You need to copy the below files from C:\Program Files\Windows AIK\Tools\x86 to your GImageX folder
    wimgapi.dll
    wimmount.inf
    wimmount.sys
    WimMountInstall.exe
    wimserv.exe
    imagex.exe

  • Lachlan

    @Martin
    Kill your DTCP session and run as administrator

  • Renae

    Hi Brian -

    I am completely new to this entire process. I have successfully created the bootable flash drive with the WinPE 3 boot environment. My problem now is figuring out how to use GImageX. I’ve searched online for documentation, but I’m coming up with nothing. Is there any documentation on how to use this?

  • Paul

    Anyone know why we copy the boot.wim to ISO/sources…
    Then mount it..
    And then copy it over to ISO/sources again?..

    What’s the purpose of the first copy? For backup?

  • Patrick

    It is curiouso to me why these instructions don’t include an Export (after committing the wim). If you do any mounted install.wim work like integrating updates, drivers, etc., and then do only a save/commit when you are done, the install.wim will remain quite a bit larger than it needs to be. For example, I just integrated 300mb of drivers to an install.wim, which in actuality added about a little more than 200mb to the actual wim as I was done and committed it. I then exported the install.wim and I ended up with only about 115mb added to my final install.wim.

  • Pingback: The IT Bros WinPE 3.1 Scripts - The IT Bros

  • Pingback: Deployment Image Servicing and Management (DISM) - WinPE 3.0 Boot Environment. Using WinPE 3.0 Boot environment to deploy and capture images... - The IT Bros

  • Joe

    The WAIK download always has a cab file that is corrupted so, I was just replacing them with saves from a different CD we had which fixed it (checked the modified date / time and both were the same). Every download is the same and I have tried installing it on multiple PC’s / Windows OS (7, x32 and x64)

    Then somewhere in between updating the image files with your scripts and un-mounting the image, the scripts are not being copied.

    I opened up the boot.wim with 7z to verify this, the winpe.png is not edited to the blue blackground and I can not find any of the bat scripts that were copied over. I even manually moved them over to the mount/windows/system32/ folder to make for sure they were being placed correctly.

    At a loss on what to do at the moment, since this is how I was deploying previously and the USB got misplaced.

    • http://theitbros.com/ Brian Jackson

      Were you able to get this working? I did this recently again and nothing was corrupted when downloading fresh copies.

  • Pingback: TheITBros.com - The Figures of 2012 - TheITBros