DESKTOP

Automating Windows 7 Installation : Creating Bootable WinPE Media

10/27/2013 7:42:23 PM

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.

    copy "c:\program fi1es\Windows AIK\Too1s\x86\imagex.exe" c:\winpe_x86\iso\

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

    copy "c:\program fi1es\Windows AIK\Too1s\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.

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.
Other  
  •  Automating Windows 7 Installation : Creating Your First Image, Using the Windows Automated Installation Kit
  •  Automating Windows 7 Installation : Getting Familiar with Microsoft Images (part 2) - Creating Operating System Images
  •  Automating Windows 7 Installation : Getting Familiar with Microsoft Images (part 1) - Creating a Bootable VHD Image
  •  Windows 8 : Scheduling Maintenance Tasks - Viewing and Managing Tasks on Local and Remote Systems
  •  Windows 8 : Detecting and Resolving Windows 8 Errors - Using the Event Logs for Error Tracking and Diagnosis, Viewing and Managing the Event Logs
  •  Windows 8 : Using Remote Assistance to Resolve Problems
  •  Windows 8 : Managing Automatic Updates
  •  Windows 8 : Managing Installed and Running Programs (part 3) - Configuring AutoPlay Options, Adding and Removing Windows Features
  •  Windows 8 : Managing Installed and Running Programs (part 2) - Managing the Command Path, Managing File Extensions and File Associations
  •  Windows 8 : Managing Installed and Running Programs (part 1) - Managing Currently Running Programs, Managing, Repairing, and Uninstalling Programs, Designating Default Programs
  •  
    Top 10
    Extending LINQ to Objects : Writing a Single Element Operator (part 2) - Building the RandomElement Operator
    Extending LINQ to Objects : Writing a Single Element Operator (part 1) - Building Our Own Last Operator
    3 Tips for Maintaining Your Cell Phone Battery (part 2) - Discharge Smart, Use Smart
    3 Tips for Maintaining Your Cell Phone Battery (part 1) - Charge Smart
    OPEL MERIVA : Making a grand entrance
    FORD MONDEO 2.0 ECOBOOST : Modern Mondeo
    BMW 650i COUPE : Sexy retooling of BMW's 6-series
    BMW 120d; M135i - Finely tuned
    PHP Tutorials : Storing Images in MySQL with PHP (part 2) - Creating the HTML, Inserting the Image into MySQL
    PHP Tutorials : Storing Images in MySQL with PHP (part 1) - Why store binary files in MySQL using PHP?
    REVIEW
    - First look: Apple Watch

    - 3 Tips for Maintaining Your Cell Phone Battery (part 1)

    - 3 Tips for Maintaining Your Cell Phone Battery (part 2)
    VIDEO TUTORIAL
    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
    Popular Tags
    Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS