Deploying A WIM Image With ImageX

April 13th, 2007 Posted in Miscellany

Windows VistaBefore you can deploy, you of course need to create an image; you can do that by reading my article on image creation.  I'm now going to assume that you've already done that, and are ready to deploy your image to another computer.  Have your trusty WinPE CD ready, and boot the machine you want to image from it.  The first thing we need to do is prepare the drive to accept the image.  We do this using diskpart.  The following instructions assume you're deploying the image to the primary hard drive, and that you're going to create only one partition utilizing the entire disk.  At the prompt type:diskpart
select disk 0
clean
create partition primary
select partition 1
active
format
exit
Executing the format command will take a while depending on the size of your drive as it does a full format rather than a quick format. After the format finishes, and you exit diskpart, you're ready to actually apply the image. In our environment, we store our images on a network drive. If you do the same, now would be the time to map the necessary drive with the net use command. If you're doing this, and are not on a network with DHCP enabled, you'll need to use the netsh commands to set a static IP address first. Expect an article soon on how to use netsh to set a static IP; until then, google is your friend.

From the WinPE command line, execute the following Imagex command to apply your image:D:\Tools\Imagex.exe /apply Y:\image.wim 1 C:The /apply flag tells Imagex to apply the image to the disk. Y:\image.wim is the path to the image you wish to apply, in this case I'm assuming you've mapped a network drive to Y:. The number 1 in the command tells Imagex to apply the first image in the WIM file; chances are you're only ever going to use 1, but it's required. Finally, C: is the drive you want to apply the image to.

After executing the Imagex command, you'll be shown a continually updating progress message. When the process is finished, remove your WinPE CD and reboot the computer. On first boot from the imaged drive, a new SID will be generated and drivers will be applied. It may take a few minutes and a couple of reboots, but you'll be playing with your new Vista box in no time.

[tags]Vista, Windows Vista, imaging, imagex, imagex.exe, deployment, diskpart, WinPE[/tags]





  1. One Response to “Deploying A WIM Image With ImageX”

  2. By Draon on Oct 14, 2010

    You missed one really important part. After you format the drive you need to give the drive a letter, else the WinPE wont be able to write the image to it.

    Select Disk 0
    Select Partition 1
    Assign Letter= C:

    Thanks for the rest of this guide though. First time using WIM files as images.

Post a Comment