DISM Tool – WinPE 3.1 Boot Environment


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

DISM Tool

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

[vb]
DISM /Cleanup-Wim
[/vb]

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

[vb]
copype.cmd x86 c:\winpe_x86
copy c:\winpe_x86\winpe.wim c:\winpe_x86\ISO\sources\boot.wim
[/vb]

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

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

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

[vb]
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"
[/vb]

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

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

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.

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

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

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

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

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

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

[vb]
oscdimg -n -bc:\winpe_x86\etfsboot.com c:\winpe_x86\ISO c:\winpe_x86\winpe_x86.iso
[/vb]

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

[vb]
xcopy /e /y "C:\winpe_x86" E:\BACKUP_FOLDER_FOR_LATEST_BOOT_BUILD\
[/vb]

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.

You may also like:

Sysprep a Windows 7 Machine – Start to Finis... This is the old version, please see the new Sysprep a Windows 7 Machine – Start to Finish V2. Note - I highly recommend creating a boot or rescue d...
Sysprep a Windows 7 Machine – Start to Finish V2 This is version 2 of a step by step guide on Sysprepping a Windows 7 machine from start to finish. I cannot take full credit on this because my first ...
WinPE 3.1 Scripts WinPE 3.1 Scripts This latest version was compiled on September 27th, 2012. This is the third update to our WinPE scripts. Please read our tutorial o...
Copy Taskbar Icons Windows 7 Sysprep This is the old version, please see the new Copy Taskbar Icons Windows 7 Sysprep v2. Ok, you can thank a colleague of mine (Dinyero Johnson) for th...
Fix Corrupt Windows 7/8/10 Temporary Profile While working with Microsoft’s Windows 7/8 or Windows 10 operating systems you have noticed that sometimes when working with multiple profiles that th...
Comments
  1. Posted by Dave Keiner
    • Posted by Leon Chung
      • Posted by Dave Keiner
        • Posted by ndog37
  2. Posted by Dave Keiner
  3. Posted by Brian Jackson
    • Posted by Dave Keiner
  4. Posted by JosephR
  5. Posted by Simon Watkins
  6. Posted by Jeff Beadle
    • Posted by Jeff Beadle
  7. Posted by sachida
    • Posted by Brian Jackson
      • Posted by JJ
    • Posted by JJ
  8. Posted by Michael Valentine
  9. Posted by Eric G.
  10. Posted by Mike
    • Posted by Lee
  11. Posted by Scott Tucker
  12. Posted by Carminator
  13. Posted by alex johnson
  14. Posted by Don Hudlow
  15. Posted by Lee
  16. Posted by Stuart Tottle
  17. Posted by Martin
  18. Posted by LTD
  19. Posted by Lachlan
  20. Posted by Lachlan
  21. Posted by Renae
  22. Posted by Paul
  23. Posted by Patrick
  24. Posted by Joe
    • Posted by Brian Jackson
  25. Posted by Harry Tapp
  26. Posted by Harry Tapp
  27. Posted by Harry Tapp
  28. Posted by Harry Tapp
  29. Posted by Harry Tapp
    • Posted by Brian Jackson
      • Posted by Harry Tapp
        • Posted by Brian Jackson
          • Posted by Harry Tapp
  30. Posted by Harry Tapp
  31. Posted by Francis Brooks
  32. Posted by disqus_ZTd1NJNWwV
  33. Posted by enders t
  34. Posted by disqus_ZTd1NJNWwV

Add Your Comment