Create a Windows PE 3.0 Boot CD

The process of creating a Windows PE 3.0 disk has changed slightly from the previous version. The Windows PE User’s Guide that ships with the WAIK has all the information you’ll ever need. To get started download the WAIK for Windows 7. Then follow the steps in the section “Windows PE Walkthroughs”. I’ve provided the batch file I use to create a generic WinPE 3.0 ISO below.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Echo off"
REM ********************************************************************************
REM head block
REM Setup
SET PETOOLS=C:\Program Files\Windows AIK\Tools\PETools
SET ARCH=x86
SET WORKINGDIR=%~dp0windowspe-%ARCH%
IF NOT EXIST "%WORKINGDIR%" Goto :COPYPE
Echo "%WORKINGDIR%" exists, Removing....
rmdir "%WORKINGDIR%" /S /Q
:COPYPE
cd /d "%PETOOLS%"
call copype.cmd %ARCH% "%WORKINGDIR%"
REM Copy Base WIM to boot.wim
copy "%WORKINGDIR%\winpe.wim" "%WORKINGDIR%\ISO\sources\boot.wim"
REM Mount boot.wim
Dism /Mount-Wim /WimFile:"%WORKINGDIR%\ISO\sources\boot.wim" /index:1 /MountDir:"%WORKINGDIR%\mount"
REM Add Optional Components
Dism /image:"%WORKINGDIR%\mount" /Add-Package /PackagePath:"%PETOOLS%\%ARCH%\WinPE_FPs\winpe-wmi.cab"
Dism /image:"%WORKINGDIR%\mount" /Add-Package /PackagePath:"%PETOOLS%\%ARCH%\WinPE_FPs\en-us\winpe-wmi_en-us.cab"
Dism /image:"%WORKINGDIR%\mount" /Add-Package /PackagePath:"%PETOOLS%\%ARCH%\WinPE_FPs\winpe-hta.cab"
Dism /image:"%WORKINGDIR%\mount" /Add-Package /PackagePath:"%PETOOLS%\%ARCH%\WinPE_FPs\en-us\winpe-hta_en-us.cab"
Dism /image:"%WORKINGDIR%\mount" /Add-Package /PackagePath:"%PETOOLS%\%ARCH%\WinPE_FPs\winpe-mdac.cab"
Dism /image:"%WORKINGDIR%\mount" /Add-Package /PackagePath:"%PETOOLS%\%ARCH%\WinPE_FPs\en-us\winpe-mdac_en-us.cab"
Dism /image:"%WORKINGDIR%\mount" /Add-Package /PackagePath:"%PETOOLS%\%ARCH%\WinPE_FPs\winpe-scripting.cab"
Dism /image:"%WORKINGDIR%\mount" /Add-Package /PackagePath:"%PETOOLS%\%ARCH%\WinPE_FPs\en-us\winpe-scripting_en-us.cab"
Dism /image:"%WORKINGDIR%\mount" /Add-Package /PackagePath:"%PETOOLS%\%ARCH%\WinPE_FPs\winpe-wmi.cab"
Dism /image:"%WORKINGDIR%\mount" /Add-Package /PackagePath:"%PETOOLS%\%ARCH%\WinPE_FPs\en-us\winpe-wmi_en-us.cab"
REM Copy Imagex into the Windows Dir
copy "C:\Program Files\Windows AIK\Tools\%ARCH%\imagex.exe" "%WORKINGDIR%\mount\Windows"
REM COpy Tools
xcopy %~dp0Tools %WORKINGDIR%\ISO /E /S
REM Unmount the WIM
Dism /unmount-Wim /MountDir:"%WORKINGDIR%\mount" /Commit
REM Create the ISO
oscdimg -n -b"%WORKINGDIR%\etfsboot.com" "%WORKINGDIR%\ISO" "%WORKINGDIR%\winpe_x86.iso"

You may want to comment out the line with “xcopy %~dp0Tools” at the beginning. I usually copy a bunch of tools onto my WinPE disk using this tools directory.

Leave a Comment