How To Build Your Own Image System with ImageX


I am not a fan of imaging system but it would be seriously time consuming setting up new computers if I don’t have one in place to take care of a network that consists of over a hundred of computers. But since I have no intention building one that involves server like Microsoft’s deploying server system, which always seems to be an overkill to me, I managed to build one that uses a simple command line ImageX with a bootable external 2.5″ hard drive.

The result is fantastic. Now, every time when I have a new computer coming in, I can have it ready to go within 15 minutes, counting from opening the package to shutting down and ready to carry it over to the user. All I have to do is just to boot to the external hard drive and run ImageX command to apply the desired image over to the new computer. The applying process takes between 8 and 10 minutes.

Here are the steps that you can follow to build the exact same one for yourself.

Preparing the bootable external hard drive

You will need WAIK installed on a computer to prepare WinPE powered bootable USB hard drive. You may set up 2 partitions on the drive, one for WinPE and one for saving image files.

Step 1: preparing a bootable media

I prefer using the command line diskpart but it’s up to you whether to use other tool or not. The bottom line is to make the external hard drive bootable.


list disk
select disk #
create partition primary size=10000
select partition 1
format quick fs=fat32
assign letter=G

Note that the script above is to create a primary active partition at size of 10GB with the drive letter assigned as G. Also, replace # with the actual number listed in the list disk command.

Step 2: copy WinPE image to the bootable media

Launch Deployment Tools Command Prompt from Start menu.

Deployment Tools Command Prompt_2012-08-10_11-53-46

First, run the following command

copype x86 c:\winpe_x86

Then, copy winpe.wim image file to winpe_x86 folder created one step ago.

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

Then, copy the content to the external bootable hard drive using command xcopy.

xcopy /s c:\winpe_x86\iso\*.* g:\

Assuming the G: drive is the bootable partition created in Step 1.

Now, if you like the idea of having two separate partitions, it’s time to create the second one and format it using the Windows built-in Disk Management tool.

While you are still at Deployment Tool Command Prompt, copy the ImageX.exe file over to the partition that you intend to use to store your image files. The ImageX file can be found at the following location.

%programfiles%\Windows AIK\Tools\x86

In the end, I have an external hard drive with 2 partitions, one of which can boot me to the WinPE.

Preparing a clean OS image

For instance, to prepare a clean Windows 7 system with all software preloaded.

1. Install a clean copy of Windows 7 64-bit operating system from scratch. Never use a pre-loaded system because, you know, it contains too much crapware.

2. Install all drivers and software applications with latest patches, updates installed.

3. SysPrep the system.

You can launch SysPrep from %windir%\system32\sysprep folder. Make sure always choose Shutdown to avoid booting right back to the OS pre-installation mode.

System Preparation Tool 3

Capturing the image

1. Boot to the bootable WinPE external USB hard drive. You will have to choose to boot to USB storage as the boot option during the boot process.

2. Change the drive to the one that holds ImageX executable file.

3. Run it with /capture switch to capture the image.

imagex /capture c: imagename.wim “imange name”

Assuming drive C: holds the system you want to capture.

Applying the image

These are the steps I often apply to prepare a new computer. Usually takes 8-10 minutes to finish.

Step 1: boot to the bootable hard drive

Step 2: prepare the disk

Use command line diskpart to prepare the disk. Launch diskpart, and run the following command:

select disk 0
create partition primary
format quick fs=ntfs
assign letter=w

Since I don’t want to type all these commands every single time when I set up a new computer, I saved these into a text file called createpartition.txt and stored it in the same directory where the ImageX file is saved. And simply run the following to simplify the process.

diskpart /s createpartition.txt


Step 3: apply image

Simply run ImageX with switch /apply to apply a desired image over to the new system.

imagex /apply imagename.wim 1 w:\

The command will be done within 10 minutes. Restart the computer once it’s done.

In case the restart failed, you can boot back to WinPE bootable hard drive and run the following command to apply the boot sector to the new system.

x:\windows\system32\bcdboot c:\windows /s c:

Assume the drive c: holds the operating system that needs the boot sector.

And, that’s it.


There are many imaging software that you can use to build your own imaging system. This ImageX solution is just one of them. I found it’s fairly simple to set up and deadly easy to use afterwards. Extensively, you can use it as a simple image capture tool to
back up systems wherever you need it. Because everything is stored in small USB powered 2.5″ external hard drive, you can easily carry it around and capture/apply images whenever you want it.

The setup may take a little bit time but since all time spent on setting up is only one time thing, it’s definitely worthy it considering how much time you will save later on using the system to back up or set up the new system.



  1. [email protected]

    Where are you running ImageX in step 3? I have copied it into every direcotry on my hard drive but when I try to run it in the WinPE environment, it just keeps saying it’s not a recognized command.

  2. Hi

    I got it, though I also needed to use Easybcd to be able to boot from the external disk.

    But I have a question:
    The way you explain we install Windows to a primary partition.
    But we don’t get the 100MB boot/recovery partition (that is automatically created when you install windows on a internal blank disk, and it’s usually hidden).
    How can I get that “recovery” partition created?
    I cannot find the option with easeus, diskpart, nor other applications I’ve tried.
    Nor can I get it created whit imagex, bcdboot or after rebooting.

    PS: You don’t need to download the whole Automated Installation Kit KB3AIK_EN.iso file, just the GetWaiktools.


    • the way I described in the post doesn’t reserve this hidden partition. To my understanding, only those OEM machines has the pre-load images stored on this hidden partition, which is not necessary to have if you are loading systems from the image you’ve already captured.

      • Not true. Retail version of Windows 7/8 creates said partiton for recovery and repair purposes. This is why normal imaging fails for Win 7/8 cause its looking for that partition every time you reboot. I think as long as it is there, windows will maintain it however, so if you actually could delete files from it, it goes back and tries to replace them.

  3. Its true that there is a hidden partiton created with Windows 7 and 8. This reserved partition contains update files and the original OS files, so that windows can “Self Heal” on bootup and also contains the data for the Recovery OS DVD or CD that you create in Windows 7 or 8.
    For those without knowledge, may I recommend the easy way out.

    Download and install Active@ to any computer, Have it create a boot USB or USB HDD image, During the process there is an add user files or folders you can include your image(s) that you had already created with Active@ software.
    Purchase a large flash drive or USB drive as mentioned, 32 or 64 gb flash ought to be large enough to hold an image of freshly designed windows. You can just create the flash drive and have it image any computer so if you have a computer fully working that your rolling out a series of them, this will work.

    The cool part is Active@ can restore the image to a larger or smaller drive as long as the data from the image will fit.
    Because older computers lack ability to boot from a flash drive or external USB hard drive, instead keep an Active@ boot CD handy as well. You can still do the imaging by simply connecting the flash or usb hard drive and still boot from the CD to make it all happen.

    When you do the image to disk, you will have to unmount the destination drive it asks you this.
    Also uncheck the box that wants to make it the same size, so that it can resize the partitions out to larger or smaller sizes. When asked to erase destination drive you will want to say yes.
    So the whole system can likely fit onto a single thumb drive or a CD and USB hard drive combination.

    For a system to image a series of networked computers, such as a cluster may I recomend Macrium Reflex. Its recovery CD is a Windows PE 7 based and so most wired network adapters are supported in a Windows Server environment.

    Then all you have to do, is boot up the CD and restore and you can choose Computer and Network, and enter into your server to a folder that has the image(s) you need. And also you can have it create images across the network, or to NAS devices on the same network.

  4. I have used this successfully with regular drives but it doesn’t work with the new UEFI type drives. How do I create one that actually works with both legacy and UEFI?

    • Good question. I haven’t really explored to this situation. What I normally do is just turn on Legacy boot on the new computers that are set to boot to UEFI. It seems that you will need to prepare a WinPE that can secure boot.


Please enter your comment!
Please enter your name here