homehowtokbslinksaboutcontactprojectsmusic

Index > Knowledge Base > Microsoft WinPE 3.0

Create WinPE 3.0 ISO

Make winpe directory
mkdir c:\winpe
Mount the winpe.wim image
imagex /mountrw c:\winpe\winpe.wim 1 c:\winpe\mount
dism /mount-wim /wimfile:c:\winpe\winpe.wim /index:1 /mountdir:c:\winpe\mount
Optional, Make changes in this file if needed
notepad.exe c:\winpe\mount\windows\system32\startnet.cmd
and paste the following in that file overwriting the old contents
@echo off 
title DO NOT CLOSE THIS WINDOW. Initializing....
echo Please wait....
wpeinit
ping 127.0.0.1 -n 2 >nul 2>&1
for /f "delims=" %%i in ('ipconfig ^| find "IPv4"') do set ip=%%i
set ip=%ip: =%
for /f "tokens=1,2 delims=: " %%a in ("%ip%") do set ip=%%b
ping 127.0.0.1 -n 2 >nul 2>&1
cls
if not defined ip set msg=Initialization FAILED. Missing network drivers
if defined ip set msg=DO NOT CLOSE THIS WINDOW. Initialized %ip%
title %msg%
Delete the following file, its for the Press any key for CD/DVD... prompt
del c:\winpe\ISO\boot\bootfix.bin /f/q
Inject drivers if needed
dism /image=c:\winpe\mount /add-driver /driver=c:\drivers /recurse
Unmount the winpe image
imagex.exe /unmount /commit c:\winpe\mount
Copy the the file to as boot.wim to
copy c:\winpe\winpe.wim c:\winpe\iso\sources\boot.wim /y
Finally make iso image
oscdimg -n -h -bc:\winpe\etfsboot.com c:\winpe\iso c:\winpe\winpe.iso

Inject drivers in winPE 3.0

Mount the winpe.wim image
imagex /mountrw c:\winpe\winpe.wim 1 c:\winpe\mount
Remove the bootfix.bin file to get rid of CD/DVD Message
del c:\winpe\iso\boot\bootfix.bin /s /q
Add all drivers in the folder
dism /image=c:\winpe\mount /add-driver /driver=c:\drivers /recurse
Add one driver in the folder, replace xxx with the actual name
dism /image=c:\winpe\mount /add-driver /driver=c:\drivers /recurse
Unmount the winpe image
imagex.exe /unmount /commit c:\winpe\mount
dism /unmount-wim /mountdir:c:\winpe\mount /commit
Copy/merge the winpe.wim to boot.wim
copy c:\winpe\winpe.wim c:\winpe\iso\sources\boot.wim /y
Finally make iso image and you are done
oscdimg -n -h -bc:\winpe\etfsboot.com c:\winpe\iso c:\winpe\winpe.iso

Add extra packages

add WMI package, assuming that winpe.wim is mounted in c:\winpe\mount
dism /image:c:\winpe\mount /add-package /packagepath:"c:\program files\windows aik\tools\petools\x86\winpe_fps\winpe-wmi.cab"
add HTA package
dism /image:c:\winpe\mount /add-package /packagepath:"c:\program files\windows aik\tools\petools\x86\winpe_fps\winpe-hta.cab"
add scripting package
dism /image:c:\winpe\mount /add-package /packagepath:"c:\program files\windows aik\tools\petools\x86\winpe_fps\winpe-scripting.cab"

Wpeutil Commands

Reference
Disable
wpeutil disablefirewall
Restart Computer
wpeutil reboot