How To Build Your Own Image System with ImageX

by windowsiso on August 10, 2012

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 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.

c>diskpart

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

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

copyme x86 c:winpe_x86

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

copy c:winpe_86winpe.wim c:winpe_86ISOsourcesboot.wim

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

xcopy c:winpe_x86iso*.* 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 AIKToolsx86

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%system32sysprep 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
clean
create partition primary
format quick fs=ntfs
assign letter=w
active
exit

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

createpartition

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:windowssystem32bcdboot c:windows /s c:

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

And, that’s it.

Conclusion

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.

Related Articles From Windows7hacker:


Previous post:

Next post: