Creating and deploying images using WAIK and imagex
Before beginning with the image creation or deployment – please download the WAIK tools from Microsoft (http://www.microsoft.com/downloads/details.aspx?FamilyID=C7D4BC6D-15F3-4284-9123-679830D629F2&displaylang=en) and create either a bootable DVD or bootable USB stick which contains imagex. For this please follow the documentation that comes with the WAIK tools.
Preparation
Please follow the preparation steps for both – image creation and image deployment as you’ll need to have a working network connection.
Setting up a DHCP server
You can skip this step if you have a DHCP server running in your network.
- Create a new dialup connection – the settings like number, etc. are not important.
- Open the settings of the created dialup connection and enable internet sharing for the local network adapter which will be connected with your target device.
- Check the IP-address of the local network adapter – it should be 192.168.0.1
Create a network share
On your development machine set up a network share where the image will be located. Please make sure you can access the network share from another pc and that you have write access to this share.
Mapping a network drive in Windows PE
- Boot the target machine from the previous created media.
- In the command prompt type ipconfig to check if the pc has a valid ip address. You can use ping (e.g. ping 192.168.0.1) to test if the connection to the development pc works.
- Map a network drive to your development pc.
net use N: \<IP-Address><Sharename> [/User:<pcname><username> <Password>] Sample
net use N: \192.168.0.1images /User:devmachineadministrator admin
Create an image
To create an image we will use the imagex tool which comes with the WAIK tools. For more information on imagex please have a look on Microsoft Technet http://technet.microsoft.com/en-us/library/cc722145.aspx
- Type the following command
imagex /capture C: N:image.wmi “Master image” You can also use additional paramters such as /compress to compress the image. For additional arguments please type imagex /?
Deploy an image
Before we will deploy the image we will prepare the target disk to make sure that the image can boot after the deployment.
Preparing the target disk
- Run diskpart and type the following commands
LIST DISK
DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
——– ———- ——- ——- — —
Disk 0 Online 149 GB 0 B
Disk 1 Online 149 GB 0 B
Use this command to find out the disk id of the disk that should be used as target.
SELECT DISK 0 (instead of 0 use the appropriate disk id of your target disk)
CLEAN (this will remove all partitions on the target disk)
CREATE PARTITION PRIMARY (this creates a primary partition on the target disk)
ACTIVE (set the previous created partition active)
ASSIGN LETTER = C (assign the drive letter C)
FORMAT FS=NTFS QUICK (do a quick ntfs format)
EXIT (quick diskpart)
Deploy the image
- Run the following command to deploy the image from the network share
imagex /apply n:image.wim 1 c: - Reboot your machine – it should now boot from the image properly.
Written by Wolfgang Unger
January 29, 2009 at 16:15
Posted in Windows XP Embedded
2 Responses
Subscribe to comments with RSS.
have two pc,on one of them running win7,and it is refrenc computer,an the other one is destination computer,i capture the image of pc1 with windows PE and Imagex tools so that apply that image on pc2,.and both of them connect together through workgroup connection,but every time i am going to insert bootable DVD-ROM on pc1 to open command-prompt window and enter the following instructionnet use y: \\network_share\imagecopy d:\myimge.wim y:the error occure: the network path not found. as you say on CREAT NETWORK SHAR Please make sure you can access the network share from another pc and that you have write access to this share.BUT when i will insert the win PE media on pc1 the network connection between pc1 and pc2 disconnect.plz help me
samira
February 12, 2010 at 19:57
Hi, do you have a valid IP address in your Win PE environment? Does the net use command work or do you get an error? Can you ping the other pc from Win PE?
Wolfgang
February 17, 2010 at 03:22