Creating a Windows PE USB Drive with ImageX

Having familiarised myself with building answer files and sysprep’ing reference machines I’ve recently been experimenting with WinPE, ImageX and DISM to acquaint myself with these tools as well.

My approach to exploring my interest in Windows Deployment has always been to learn from the ground up, hence I wanted to familiarise myself with these WAIK tools to begin with. Before I move on to MDT 2010 I want to write a couple of ‘how to’ posts on creating a Windown PE disk, capturing and applying an image using imagex and my experiments with these tools in general.

In this post I will provide instructions on creating a bootable WinPE USB drive, with ImageX “integrated” into the Windows PE environment.

What you will need:

A Technician Computer (A windows 7 machine with the WAIK installed)

A USB drive to create a bootable WinPE disk

Building the WinPE Environment

On your Technician Computer open the “Deployment Tools Command Prompt” from Start, All Programs, Microsoft Windows AIK.

Note that these instructions are to create a 64-bit WinPE disk. If however you prefer To create 32-bit WinPE disks simply replace amd64 with x86 in these instructions.

At the command prompt type the following commands. Replace amd64 with x86 if you wish to create a 32-bit WinPE disk.

CopyPE.cmd amd64 C:\WinPE_amd64

DISM /Mount-WIM /WimFile:c:\WinPE_amd64\WinPE.wim /Index:1 /MountDir:c:\WinPE_amd64\Mount

Copy “C:\Program Files\Windows AIK\Tools\amd64\ImageX.exe” C:\WinPE_amd64\Mount\Windows\System32\

DISM /Unmount-WIM /MountDir:C:\WinPE_amd64\Mount /Commit

Copy C:\WinPE_amd64\WinPE.wim C:\WinPE_amd64\ISO\Sources\boot.wim

Preparing the USB Drive

The USB drive will need to be prepared before you can copy over the WinPE files. This includes stripping all formatting, creating a new active primary partition, and finally formatting it as FAT32 using diskpart.

On the command prompt type the following commands

diskpart
list disk

This will list all disks connected to your computer including USB drives. Identify your USB flash drive from the list and make note of the disk no. In my example below I can easily identify my USB drive as disk 5.

image

Make sure you get the right disk number and proceed with the rest of the instructions here.

select disk 5
clean
create partition primary
select partition 1
active
format quick fs=fat32
assign
exit

Finishing Off

Finally copy everything from c:\winpe_amd64\iso to the usb drive. Once that’s done you now have a Windows PE USB drive to capture and apply Windows 7 images using ImageX.

In my next post I will cover how to capture Windows 7 images using the WinPE USB drive created in this post.

PS. The very first time I tried doing this I ended up copying imagex to the c:\winpe_amd64\iso directory which meant it wasn’t actually “integrated” into the WinPE environment but instead had to be launched from the USB drive. Although not technically a ‘mistake’ as such, it required using diskpart to work out the drive letter of the usb drive to be able to use imagex. In my second attempt I used ImageX (instead of DISM) to mount the winpe.wim file to copy imagex into the c:\winpe_amd64\mount\Windows\System32 folder which is how it’s done with Vista and not Windows 7. Although this worked just fine, I wanted to do it the right way so I used DISM to do it properly on my third attempt. It’s fair to say it’s been a learning experience.

Follow Me, Myself and IT on Twitter:

Advertisements

16 thoughts on “Creating a Windows PE USB Drive with ImageX

    • You’re very welcome. Thank you for taking the time to comment. I haven’t been paying much attention to my blog lately, your comment and appreciation might just spur me on to start writing again. Thank you for visiting.

  1. Thank you so much! I have 20 new machines to image and I’ve been using Imagex on a cd-rom. This is the best explanation of the Imagex to USB process that I’ve found. It looks like, after your job change, you’re no longer posting updates to your blog. I wish you would continue to share your knowledge because you do it well!

    • Hi Teresa,

      Thank you so much for your kind words!

      You’re right, I haven’t been giving my blog much attention. I’ve had a few posts planned but they never materialised.

      I really appreciate you taking the time to comment on the post/blog. Your kind words has definitely inspired me into action – I’m currently working on a couple of posts.

      Thank you again, and take care.

  2. I have seen in some other sites that they mention – ‘Windows 7 Ultimate with all updates and installed applications in AUDIT Mode’. I tried to give it a shot and did the following…

    1. Installed Virtual PC
    2. Installed Windows 7 from ISO
    3. Logged in to Audit mode by pressing CTRL + SHIFT + F3 (when it asks for username during install)
    4. Installed all the Apps and updates onto that
    5. Then Shutdown.

    On my Main PC, Mounted the VHD File from Disk Management and used Imagex to repack the mounted partition to INSTALL.WIM file.
    Then, I tried to replace the SOURCES/INSTALL.WIM with my WIM File. Then tried to install Windows 7 but it does not work.

    I know there are ways to repack WIM files with all the customizations and updates.
    I want to keep the same structure as Windows DVD has with all my customization/Preinstalled Freewares and then want to burn them to a DVD. This DVD should be Hardware Independent as I have 3 PCs.

    Would anyone help me with this please…

    Do I need any Answer file ? I do not want unattended setup.

    What am I doing wrong ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s