Creating a Windows PE 3.0 CD ISO

From ITCwiki
Jump to navigation Jump to search

Windows PE is the basis for the installation process of Windows Vista, Server 2008 and Windows 7. It can also be used for system maintenance and for the offline creation of system images with the ImageX utility.

Differences Between These CDs

The major difference between the basic CD and the added packages CD is of course the packages which have been added to the later one. A more subtle difference is that, although they both contain the ImageX program, the basic CD simply copies it into the ISO directory and the added package CD copies it into the mounted image Windows directory. The difference here is evident when you boot the respective images. The mounted image Windows directory ends up as a "RAM disk" and is the default location in the command prompt when the PE image is booted while the ISO directory becomes the root of the created CD image and which is mounted to a different drive letter during the PE boot process. Advantages and disadvantages exist to both methods.

Creating a Basic CD

Instructions for creating a Windows PE 3.0 (WinPE) bootable CD image with the ImageX.exe program used for creating WIM format images of Windows 7 systems. These steps would typically be done on a technician computer and not on the system which you are creating the image of.

  1. Download the Microsoft Windows 7 Automated Installation Kit (WAIK) which is distributed as an ISO image file and use it to install WAIK on the technician computer.
  2. Run a command prompt as administrator.
    • This can be done with Start -> All Programs -> Accessories and right-clicking on "Command Prompt" and selecting "Run as Administrator"
  3. Change the working directory to the PETools folder of the WAIK installation
    • cd C:\Program Files\Windows AIK\Tools\PETools\
  4. Use the copype.cmd script to create a WinPE image build directory copype.cmd <architecture> <destination>
    • To create a 32-bit WinPE build in the c:\winpe_x86 directory: copype.cmd x86 c:\winpe_x86
  5. Set the winpe.wim file as the bootable system for the CD by copying it from the main build directory into the iso\sources directory as boot.wim
    • copy c:\winpe_x86\winpe.wim c:\winpe_x86\iso\sources\boot.wim
  6. Copy the ImageX.exe program from the WAIK tools into the WinPE build ISO directory
    • copy “c:\Program Files\Windows AIK\Tools\x86\imagex.exe” c:\winpe_x86\iso
  7. Create a new bootable ISO image file with the oscdimg tool using the ISO directory as the source
    • oscdimg -n c:\winpe_x86\ISO c:\winpe_x86\winpe_x86.iso -n -bc:\winpe_x86\etfsboot.com
    • Note that there is no space between the -b flag and the location of etfsboot.com which is the El Torrito boot sector and which makes the CD image bootable.
  8. The created CD image can be used as a virtual CD in virtualization software or burned to a CD and used to boot physical systems into WinPE with the ImageX utility included.

Creating a CD with Added Packages

Instructions for creating a Windows PE 3.0 (WinPE) bootable CD image with the HTA and MDAC packages and ImageX utility used for creating WIM format images of Windows systems. These steps would typically be done on a technician computer and not on the system which you are creating the image of.

  1. Download the Microsoft Windows 7 Automated Installation Kit (WAIK) which is distributed as an ISO image file and use it to install WAIK on the technician computer. The Windows 7 AIK will work with Windows Server 2003, Windows Vista, Server 2008 and Windows 7 systems.
  2. Run a command prompt as administrator.
    • This can be done with Start -> All Programs -> Accessories and right-clicking on "Command Prompt" and selecting "Run as Administrator"
  3. Change the working directory to the PETools folder of the WAIK installation
    • cd C:\Program Files\Windows AIK\Tools\PETools\
  4. Use the copype.cmd script to create a WinPE image build directory copype.cmd <architecture> <destination>
    • To create a 32-bit WinPE build in the c:\winpe_x86 directory: copype.cmd x86 c:\winpe_x86
  5. Change the working directory to the WinPE image build directory you just created
    • cd c:\winpe_x86
  6. Cleanup any previous WIM files you may have been working on with the DISM tool
    • dism /Cleanup-Wim
  7. Set the winpe.wim file as the bootable system for the CD by copying it from the main build directory into the iso\sources directory as boot.wim
    • copy c:\winpe_x86\winpe.wim c:\winpe_x86\iso\sources\boot.wim
  8. Mount the boot.wim file to allow you to add additional packages
    • dism /Mount-Wim /WimFile:c:\winpe_x86\iso\sources\boot.wim /index:1 /MountDir:C:\winpe_x86\mount
    • Note that you can also mount and dismount WIM files with the ImageX command.
  9. Add the HTA and MDAC packages to your mounted WIM file
    • dism /Image:c:\winpe_x86\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-hta.cab"
    • dism /Image:c:\winpe_x86\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-mdac.cab"
  10. Verify the packages installed in your image
    • dism /Image:c:\winpe_x86\mount /Get-Packages
  11. Copy the ImageX.exe program from the WAIK tools into your mounted WinPE image system directory
    • copy “c:\Program Files\Windows AIK\Tools\x86\imagex.exe” c:\winpe_x86\mount\windows
  12. Commit your changes to the WIM file and dismount it
    • dism /Unmount-Wim /MountDir:C:\winpe_x86\mount\ /commit
  13. Create a new bootable ISO image file with the oscdimg tool using the ISO directory as the source
    • oscdimg -n c:\winpe_x86\ISO c:\winpe_x86\winpe_x86.iso -n -bc:\winpe_x86\etfsboot.com
    • Note that there is no space between the -b flag and the location of etfsboot.com which is the El Torrito boot sector and which makes the CD image bootable.
  14. The created CD image can be used as a virtual CD in virtualization software or burned to a CD and used to boot physical systems into WinPE with the ImageX utility included.