ConfigMgr : Create a “Legacy” Windows PE Boot Image

If you’re still running ESX/ESXi 4.x anywhere in your environment then the SCCM 2012 Service Pack 1 upgrade will have been painful – the deployment I’ve been working on has until now been specifically client focused, however we’re now looking at server deployment via SCCM. Whilst we have ESXi 5.x across the estate there is still a spattering of ESX 4.x that we will have to support new Server 2008 R2 deployments to in the short term.

You can use the following batch file to create a WAIK-based Windows PE 3 boot image that will work on ESX/ESXi 4.x – download the WAIK from here: http://www.microsoft.com/en-us/download/details.aspx?id=5753

{code lang:css showtitle:false lines:false hidden:false}:: Install ‘legacy’ WAIK from http://www.microsoft.com/en-us/download/details.aspx?id=5753

:: Create Directories
mkdir C:\Temp\WinPEMount
mkdir C:\Temp\WinPEx64

:: Copy PE Image
copy “C:\Program Files\Windows AIK\Tools\PETools\amd64\winpe.wim” C:\Temp\WinPEx64\

:: CD to correct DISM verion (WAIK)
cd “C:\Program Files\Windows AIK\Tools\Servicing”

:: Mount Image
dism.exe /mount-wim /wimfile:C:\Temp\WinPEx64\winpe.wim /index:1 /mountdir:C:\Temp\WinPEMount

:: Add required components
dism.exe /image:C:\Temp\WinPEMount /add-package /packagepath:”C:\Program Files\Windows AIK\Tools\PETools\amd64\WinPE_FPs\winpe-wmi.cab”
dism.exe /image:C:\Temp\WinPEMount /add-package /packagepath:”C:\Program Files\Windows AIK\Tools\PETools\amd64\WinPE_FPs\winpe-scripting.cab”
dism.exe /image:C:\Temp\WinPEMount /add-package /packagepath:”C:\Program Files\Windows AIK\Tools\PETools\amd64\WinPE_FPs\winpe-hta.cab”
dism.exe /image:C:\Temp\WinPEMount /add-package /packagepath:”C:\Program Files\Windows AIK\Tools\PETools\amd64\WinPE_FPs\winpe-wds-tools.cab”
dism.exe /image:C:\Temp\WinPEMount /add-package /packagepath:”C:\Program Files\Windows AIK\Tools\PETools\amd64\WinPE_FPs\en-us\winpe-wmi_en-us.cab”
dism.exe /image:C:\Temp\WinPEMount /add-package /packagepath:”C:\Program Files\Windows AIK\Tools\PETools\amd64\WinPE_FPs\en-us\winpe-wds-tools_en-us.cab”
dism.exe /image:C:\Temp\WinPEMount /add-package /packagepath:”C:\Program Files\Windows AIK\Tools\PETools\amd64\WinPE_FPs\en-us\winpe-hta_en-us.cab”
dism.exe /image:C:\Temp\WinPEMount /add-package /packagepath:”C:\Program Files\Windows AIK\Tools\PETools\amd64\WinPE_FPs\en-us\winpe-scripting_en-us.cab”

:: Inject Drivers for vmxnet3
dism.exe /image:C:\Temp\WinPEMount /add-driver /driver:”C:\Temp\Drivers\vmxnet3-8.3.12 build-493255\vmxnet3ndis6.inf”

:: Commit changes and unmount
dism.exe /unmount-wim /mountdir:C:\Temp\WinPEMount /commit

:: Now import to SCCM and assign to VMWare Windows 2008 R2 Task Sequence{/code}