WinPE

Windows 7 PE add drivers

Navigate to Start -> All Programs -> Microsoft Windows AIK

Run “Deployment and Imaging Tools Environment” as administrator

*Assume you already have a PE folder under C:\WinPE_x86

Mount image by executing following command:

dism.exe /Mount-Wim /WimFile:c:\winpe_x86\winpe.wim /index:1 /MountDir:c:\winpe_x86\mount

 Add drivers (.inf file) by executing following command:

dism /Add-Driver /Image:”C:\WinPE_X86\mount” /Driver:”%yourdriverpath%”

*Replace %yourdriverpath% with the location of inf file(s).

Unmount and commit to file:

dism.exe /Unmount-Wim /MountDir:c:\winpe_x86\mount /Commit

create ISO file:

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

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

ref: https://technet.microsoft.com/en-au/library/dn613857.aspx

Advertisements
WinPE

Create Windows PE based on Windows 7

Download Windows 7 WAIK here, this will download an ISO file, you need to use virtual DVD app (like Virtual CloneDrive) to mount to your system.

Download Windows 7 SP1 supplement here.

Once downloaded, mount the ISO and install WAIK to default location. After installation, mount the SP1 supplement ISO and run following command in CMD:

xcopy F:\ “C:\Program Files\Windows AIK\Tools\PETools” /ERDY

Edit drive letter according to yours.

Create a folder “C:\Program Files\Windows AIK\WinPE3-Utils” for utility software and copy executable files like ghost32.exe

Open Notepad and copy the following command and save to Make-PE3.cmd file:

C:
CD “C:\Program Files\Windows AIK\Tools\PETools”
call copype.cmd x86 c:\winpe_x86
dism.exe /Mount-Wim /WimFile:c:\winpe_x86\winpe.wim /index:1 /MountDir:c:\winpe_x86\mount
dism.exe /image:c:\winpe_x86\mount /Get-Packages
pause
dism.exe /image:c:\winpe_x86\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-hta.cab”
dism.exe /image:c:\winpe_x86\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\en-us\winpe-hta_en-us.cab”
REM dism.exe /image:c:\winpe_x86\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-legacysetup.cab”
REM dism.exe /image:c:\winpe_x86\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\en-us\winpe-legacysetup_en-us.cab”
dism.exe /image:c:\winpe_x86\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-mdac.cab”
dism.exe /image:c:\winpe_x86\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\en-us\winpe-mdac_en-us.cab”
dism.exe /image:c:\winpe_x86\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-pppoe.cab”
dism.exe /image:c:\winpe_x86\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\en-us\winpe-PPPOE_en-us.cab”
dism.exe /image:c:\winpe_x86\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-scripting.cab”
dism.exe /image:c:\winpe_x86\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\en-us\winpe-scripting_en-us.cab”
REM dism.exe /image:c:\winpe_x86\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-setup.cab”
REM dism.exe /image:c:\winpe_x86\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\en-us\winpe-setup_en-us.cab”
REM dism.exe /image:c:\winpe_x86\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-setup-client.cab”
REM dism.exe /image:c:\winpe_x86\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\en-us\winpe-setup-client_en-us.cab”
REM dism.exe /image:c:\winpe_x86\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-setup-server.cab”
REM dism.exe /image:c:\winpe_x86\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\en-us\winpe-setup-server_en-us.cab”
dism.exe /image:c:\winpe_x86\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-wmi.cab”
dism.exe /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”
copy “C:\Program Files\Windows AIK\Tools\x86\imagex.exe” “c:\winpe_x86\mount\Windows\System32”
copy “C:\Program Files\Windows AIK\WinPE3-Utils\*.*” “c:\winpe_x86\mount\Windows\System32”
dism.exe /Unmount-Wim /MountDir:c:\winpe_x86\mount /Commit
copy c:\winpe_x86\winpe.wim c:\winpe_x86\ISO\sources\boot.wim
del /q c:\winpe_x86\iso\boot\bootfix.bin
oscdimg -n -bc:\winpe_x86\etfsboot.com c:\winpe_x86\ISO c:\winpe_x86\Winpe_x86.iso
pause

Run the file with Administrator right and it will create folder C:\WinPE_x86 with ISO file under it.
ref: http://www.symantec.com/connect/articles/creating-and-using-winpe31-image-gss-251