Windows 7 / Getting Started

Creating Bootable WinPE Media

You can create your own bootable WinPE disc. You can then use this disc to boot to WinPE on any system to capture or deploy an image using ImageX. The following section includes steps you can use to create a bootable USB drive or bootable CD. These steps assume you have installed the WAIK on your system.

WinPE can be created for x86, AMD64, or IA64 systems. The commands are slightly different depending on which version you need. The x86 version is used for 32-bit systems, the AMD64 version is used for 64-bit versions (including Intel 64-bit systems), and the IA64 version is used for Itanium systems. You need to use the version based on the architecture of the target system. In other words, you could be creating the WinPE on a 32-bit technician's computer but plan on using the bootable media on a 64-bit target system, so you would use the commands to create the AMD64 version.

The two most common architectures are x86 and x64, so the following steps show the commands for each of these versions. The x86 procedure is provided first in each step.

  1. Launch the Deployment Tools command prompt by clicking Start → All Programs → Microsoft Windows AIK → Deployment Tools Command Prompt.
  2. At the command prompt, enter the following command:

    copype.cmd x86 c:\WinPE_x86

    For a 64-bit version, use this command:

    copype.cmd amd64 c:\WinPE_amd64

    You can name the destination folder anything you want. It doesn't need to be named WinPE_x86 or WinPE_amd64. This will copy several files and folders into the target folder.
  3. Use the following command to copy the winpe.wim file into your WinPE folders as the boot.wim file:

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

    For a 64-bit target system, use the following command:

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

  4. Use the following command to copy the ImageX.exe file into your WinPE folders. Additional steps in the "Capturing an Image Using ImageX" section later in this article will show you how to use the ImageX tool to capture an image after booting into the WinPE.

    copy "c:\program files\Windows AIK\Tools\x86\imagex.exe" c:\winpe_x86\iso\

    For a 64-bit target system, use the following command:

    copy "c:\program files\Windows AIK\Tools\amd64\imagex.exe"

    c:\winpe_amd64\iso\

  5. Create an .iso image with the oscdimg (operating system to CD image) command. The -n switch specifies that long filenames can be used. The -b switch specifies the location of the boot sector file (etfsboot.com), and there aren't any spaces between the -b switch and the location. The following command creates an .iso image in the C:\winpe_x86\folder from the contents of the C:\winpe_x86\iso folder:

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


    For a 64-bit version, use the following command:

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

  6. Place a blank CD into your CD-ROM burner. Launch Windows Explorer and browse to the folder holding the .iso image (C:\WinPE_x86 or C:\WinPE_amd64). Right-click over the .iso file and select Burn Disc Image.

At this point, you have a bootable CD that you can use to boot a system to WinPE, and it includes the ImageX tool. Remember, if you plan to use this to deploy a 64-bit image, make sure that you use the 64-bit version.

With the size of USB flash drives constantly increasing while their prices decrease, you may want to create a bootable USB drive. You can do so by following these steps. Be careful, though: these steps will delete all the data on your USB flash drive, so make sure you copy all your data off the drive before starting. Additionally, these steps assume you've already created the WinPE image folders.

  1. Insert a USB flash drive into your system.
  2. Launch a command prompt with administrative permissions by clicking Start, typing Command in the Start Search text box, right-clicking over Command Prompt, and selecting Run As Administrator. If prompted by UAC, click Yes to continue.
  3. At the command prompt, enter the following command to access the DiskPart tool:

    DiskPart

  4. At the DiskPart prompt, enter the following command:

    List Disk


    You'll see an output similar to the following:
    Disk ###  Status         Size    Free    Dyn  Gpt
    --------  ------------- ------- -------  ---  ---
    Disk 0     Online        465 GB  1024 KB
    Disk 1     Online        298 GB  2048 KB
    Disk 2     Online         14 GB     0 B
    
    Identify which disk is your flash drive. On our sample system, Disk 2 is our USB flash drive and it's listed as 14 GB, so we'll use Disk 2 in our examples in these steps.
  5. Enter the following command at the DiskPart command prompt, ensuring you are using the number of your own USB drive:

    Select Disk 2

    The next step will delete all the data on your flash drive so ensure you have backed up any data you want to keep before continuing.
  6. Use the following command to remove all the data on your disk.

    Clean

    You'll see a message that says DiskPart succeeded in cleaning the disk. At this point, the data on the flash drive is gone.
  7. Enter the following command to create a primary partition on the drive:

    Create Partition Primary DiskPart will create it and display a message that DiskPart succeeded in creating the specified partition.
  8. Enter the following command to select the partition you just created:

    Select Partition 1

    DiskPart will select it and display a message that Partition 1 is now the selected partition.
  9. Mark the partition as Active with this command:

    Active

    DiskPart will display a message that DiskPart marked the current partition as active.
  10. Format the partition with the following command:

    Format quick FS=fat32

    DiskPart will format the drive while displaying its progress. When it's done, it will display a message that DiskPart successfully formatted the volume. If desired, you can also format the partition with NTFS by using the command Format quick FS=NTFS.
  11. Enter the following command to have your operating system assign a drive letter to the USB drive:

    Assign

    DiskPart will display a message that DiskPart successfully assigned the drive letter or mount point.
  12. Exit DiskPart with the following command:

    Exit

  13. Use Windows Explorer to determine what drive letter was assigned to your USB flash drive. The following examples assume the drive letter is x: but you'll likely have a different drive letter assigned.
  14. Copy the contents of the ISO folder created earlier onto the USB drive with the following command. Substitute the letter x: with the drive that was assigned to your flash drive and determined in the previous step. The /e switch copies all subdirectories, including empty ones:

    xcopy c:\winpe_x86\iso\*.* /e x:\

That's it. At this point, you have a bootable USB drive. The great thing about a bootable USB drive is that if it is big enough, you can carry the image and the WinPE on the same flash drive. In other words, you use the flash drive to boot the system to WinPE and then deploy the image from the USB. You can also use this flash drive to capture an image you prepared with Sysprep, as you'll see in the section "Capturing an Image Using ImageX" later in this article.

Keep the following warning in mind: your system may not be configured to boot to a USB device, so you may need to modify the BIOS. The BIOS on some older systems doesn't support booting to BIOS, so you may have to flash the BIOS to get this capability.

[Previous] [Contents] [Next]