You are here:   Research
  |  Login
The quickest way to find articles is to use the search option below these two lines, and to the right.

Also, if you go to the end of this page, you find the Blog archive (calendar format) that allows for browsing of older articles.

 
     

Windows 8 Preview - Howto - Creating a WinPE boot image with .NET Framework and PowerShell

Sep 14 2011

Here is a step-by-step guide to create a x64 bootimage with support for Scripting, WMI, HTA, ADO, .NET Framework 4.0, PowerShell and the DISM cmdlets for PowerShell.

Create the boot image

In this sample you will create a x64 boot image.


  1. Download the Assessment and Deployment Kit (ADK) from MSDN subscribers download

  2. Install ADK by running adksetup.exe, and make sure that Windows Preinstallation Environment is selected (selected by default)

  3. Create the C:\WinPE_x64 folder

  4. Copy the winpe.wim file from C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64 to C:\WinPE_x64

  5. Create the C:\Mount folder

  6. Start the Deployment Tools and Imaging Environment, and mount the boot image using the following command:

    Imagex /mountrw C:\WinPE_x64\winpe.wim 1 C:\Mount

  7. Add the various optional components to the boot image by running the following commands:

    cd /d "C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs"

    dism /image:C:\Mount /add-package /packagepath:"WinPE-Scripting.cab"

    dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-Scripting_en-us.cab"


    dism /image:C:\Mount /add-package /packagepath:"WinPE-WMI.cab"

    dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-WMI_en-us.cab"


    dism /image:C:\Mount /add-package /packagepath:"WinPE-MDAC.cab"

    dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-MDAC_en-us.cab"


    dism /image:C:\Mount /add-package /packagepath:"WinPE-HTA.cab"

    dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-HTA_en-us.cab"


    dism /image:C:\Mount /add-package /packagepath:"WinPE-NetFx4.cab"

    dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-NetFx4_en-us.cab"


    dism /image:C:\Mount /add-package /packagepath:"WinPE-PowerShell3.cab"

    dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-PowerShell3_en-us.cab"


    dism /image:C:\Mount /add-package /packagepath:"WinPE-DismCmdlets.cab"

    dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-DismCmdlets_en-us.cab"
     

  8. Commit the changes to the boot image by running the following command:

    Imagex /unmount /commit C:\Mount

  9. Done, you now have 280 MB or so boot image, that you can add to your WDS (PXE) server.

Optional step - create a bootable ISO image.

If you don't have a PXE server or just want to mount an ISO for test, here you find the additional steps to create a bootable ISO.

  1. Create the C:\WinPE_x64\ISO folder

  2. Copy the contents of the C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\Media folder to C:\WinPE_x64\ISO

  3. Create the C:\WinPE_x64\ISO\Sources folder

  4. copy (or move) the winpe.wim file in C:\WinPE_x64 to C:\WinPE_x64\ISO\Sources

  5. Rename the winpe.wim file in C:\WinPE_x64\ISO\Sources to boot.wim

  6. Copy the etfsboot.com file from C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Deployment and Imaging Tools\amd64\Oscdimg to C:\WinPE_x64

  7. Create the bootable ISO by running the following command:

    oscdimg -b"c:\WinPE_X64\etfsboot.com" -n C:\WinPE_X64\ISO C:\WinPE_X64\WinPE_X64.iso

  8. Done, you now have a 330 MB or so ISO.




The PowerShell command window in WinPE - Listing some hardware info using WMI.


/ Johan

 

Blog Archive

Minimize