25 May 2009

Windows Preinstallation Environment (Windows PE 3.0 - based on Windows 7)

Windows® Preinstallation Environment (Windows PE) is a minimal operating system designed to prepare a computer for Windows installation (and not just for Installation). Windows PE is available as a stand-alone product to customers with the proper licensing agreement. It is an integrated component of many Windows Setup and recovery technologies, including Setup for Windows® 7and Windows Deployment Services (WDS).

Windows PE 3.0 is the latest release based on the Windows 7 operating system.

I've changed few scripts that I've found on MSFN Forum and now I'd like to share a script, that will create a WinPE 3.0 ISO just by one click :)...

I called this script _WinPE-3_Builder.bat. here is a content of _WinPE-3_Builder.bat


@Echo off
%SYSTEMDRIVE%

CD "C:\Program Files\Windows AIK\Tools\PETools"

Set Architecture=x86
Set PEDest=c:\winpe_x86
Set ISOName=winpe_x86.iso
Set removeboot=true

pushd %cd%

call copype.cmd %Architecture% %PEDest%

Dism /Mount-Wim /WimFile:%PEDest%\winpe.wim /index:1 /MountDir:%PEDest%\mount
Dism /image:%PEDest%\mount /Get-Packages

Dism /image:%PEDest%\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\winpe-hta.cab"
Dism /image:%PEDest%\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\en-us\winpe-hta_en-us.cab"

Dism /image:%PEDest%\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\winpe-legacysetup.cab"
Dism /image:%PEDest%\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\en-us\winpe-legacysetup_en-us.cab"

Dism /image:%PEDest%\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\winpe-mdac.cab"
Dism /image:%PEDest%\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\en-us\winpe-mdac_en-us.cab"

Dism /image:%PEDest%\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\winpe-pppoe.cab"
Dism /image:%PEDest%\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\en-us\winpe-PPPOE_en-us.cab"

Dism /image:%PEDest%\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\winpe-scripting.cab"
Dism /image:%PEDest%\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\en-us\winpe-scripting_en-us.cab"

REM Dism /image:%PEDest%\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\winpe-setup.cab"
REM Dism /image:%PEDest%\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\en-us\winpe-setup_en-us.cab"

REM Dism /image:%PEDest%\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\winpe-setup-client.cab"
REM Dism /image:%PEDest%\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\en-us\winpe-setup-client_en-us.cab"

REM Dism /image:%PEDest%\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\winpe-setup-server.cab"
REM Dism /image:%PEDest%\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\en-us\winpe-setup-server_en-us.cab"

Dism /image:%PEDest%\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\winpe-wmi.cab"
Dism /image:%PEDest%\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\%Architecture%\WinPE_FPs\en-us\winpe-wmi_en-us.cab"

copy "C:\Program Files\Windows AIK\Tools\%Architecture%\imagex.exe" %PEDest%\mount\Windows\System32\

Dism /Unmount-Wim /MountDir:%PEDest%\mount /Commit
Copy %PEDest%\winpe.wim %PEDest%\ISO\sources\boot.wim

IF "%removeboot%"=="true" del /q %pedest%\iso\boot\bootfix.bin

oscdimg -n -b%PEDest%\etfsboot.com %PEDest%\ISO %PEDest%\%ISOName%

popd





Follow ITstuff.ca on Twitter

If you enjoyed this post consider subscribing via rssrectangle ITStuff.ca | Tips and Tricks for IT Staff or ITStuff.ca | Tips and Tricks for IT Staff Email


Bookmark and Share ITStuff.ca

4 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Here is a link to my customized WinPE boot disc. All that has been added is freeware, and nothing is mine, I just googled a bunch and put it all together.
    Feedback is welcome, also feel free to change as you please and redistribute. jdb420=at=hotmail>dot<com


    http://www.filehosting.org/file/details/90043/trogPE_ver._0.2alpha1(winPE3).iso

    ReplyDelete
  3. Will this work with VMWare?

    ReplyDelete