Now that the Windows ADK for Windows 8 (WADK) superseded the old Windows AIK, the procedure to create a Windows PE image has slightly changed. In my opinion, it has greatly improved as Microsoft has now included a simple command-line utility that is capable of creating both ISO and USB flash drives. The name of this utility is MakeWinPEMedia.cmd, and once the WADK is installed, you can find this utility here:
C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\MakeWinPEMedia.cmd
OK, so how do you create a WinPE 4.0 image? Let’s read ahead!
- You will need to download and install Windows ADK for Windows 8. The installation is as simple as running the adksetup.exe executable and making sure to check off the Windows Pre-installation Environment option.
- Once installed, click on Start, All Programs, Windows Kits, Windows ADK, Deployment and Imaging Tools Environment.
- Type the following commands depending on what hardware architecture you need:
WinPE x86 copype.cmd x86 C:\WinPE_x86 WinPE x64 copype.cmd amd64 C:\WinPE_x64
- Once the files are copied, you can optionally mount the boot.wim. You would want to do this in order to integrate mass storage, USB and ethernet hardware drivers and/or scripts.
ImageX.exe /Mountrw C:\WinPE_x86\media\sources\boot.wim 1 C:\WinPE_x86\mount
For hardware drivers integration, I like to use DISM GUI, a graphical user interface to the excellent command-line utility, DISM.EXE. Though it has no documentation yet, the interface is pretty intuitive. In a nutshell, you choose the WIM file and mount location, then go to the Driver Management tab and choose a directory of drivers to integrate.
For utility and/ or scripts, I always add GImageX, which is a graphical user interface for IMAGEX.EXE command-line utility. When adding this utility, the original Microsoft ImageX.exe executable is not needed, only the GImageX.exe executable is required. Also, please make sure to add this to the “C:\WinPE_x86\mount\Windows\System32” directory.
- Once your changes to the WIM are complete, you will need to dismount and commit all changes:
ImageX.exe /Unmount /Commit C:\WinPE_x86\mount
- Now we can build out our WinPE image depending on our target, USB or ISO image:
ISO Image MakeWinPEMedia.cmd /ISO C:\WinPE_x86 C:\WinPE_x86\WinPE_x86.ISO USB Flash Drive MakeWinPEMedia.cmd /UFD /F C:\WinPE_x86 G:
I hope you have enjoyed this tutorial as much as I have enjoyed making it for you. If you have any questions, please comment. Thank you in advance.