Microsoft
Windows Embedded Home
Intelligent Systems
Windows Embedded 8 Family
Windows Embedded 7 Family
Other Windows Embedded Products
Resources
One of the biggest changes between our Windows Embedded Standard 2009 (XP Embedded) and Windows Embedded Standard 2011 tools is the concept of image building. In Windows Embedded Standard 2009, components were selected in Target Designer and images assembled on the developer machine, after which it had to be transferred to the target device. In Windows Embedded Standard 2011, images are now built directly on the device using our Image Based Wizard (IBW) which can be configured “on the fly” using the wizard interface, or by using a preconfigured answer file. Each method has its own pros and cons, and while I won’t go into them, there certain applications and scenarios where it is still advantageous to be able to build images offline.
This article goes over the steps for assembling a Windows Embedded Standard 2011 image with the desired feature sets, using only the tools found on your developer machine. This method can save a lot of time and also utilize less memory on the target, if you have to build & deploy your images on a resource constrained devices. As an example, we found that the time taken for building and deploying a MaxBoot image on a target device with 2 Ghz machine w/ 1gig of ram can be cut from 30 minutes to 15 minutes. The time savings only get greater for target devices with more limited resources. Note: This does not include the time taken to offline-build the image as those times can vary significantly depending on the configuration of the developer machine.
Before I proceed further, please note that this method for building images is not a perfect substitute for building images using the IBW. Not all image configurations can be built using this method, and I’ll call out what developers should be aware of as we proceed through the steps.
Step 1: Create an answer file/configuration set
The first step to building your image is to select the feature sets, settings, and drivers that you want in your image. You need to do this using the Image Configuration Editor (quick tutorial available here).
After building & validating your answer file, you will want to generate a configuration set of your answer file. A configuration set creates an AutoUnattend.xml file and copies the packages needed to support the AutoUnattend.xml to the specified folder.
You can create the configuration set by clicking on ‘Tools’ and then ‘Create Configuration Set’ and specifying the output folder.
-------------------------------------------------------------------
Step 2: Applying the Configuration Set & Capturing the image
This set requires that you have DISM on your Machine. DISM is the new servicing tool that comes provided with Windows 7, so these steps will need to be executed on a Windows 7 machine.
>mkdir mount
>dism /mount-wim /wimfile:install.wim /index:1 /mountdir:mount
>dism /image:mount /apply-unattend:AutoUnattend.xml
>imagex /capture mount custom_image.wim “My Custom Image”
>dism /unmount-wim /mountdir:mount /COMMIT
You should now have a custom_install.wim file that represents the image that was specified in the configuration set. The next step is to deploy this image to the target device.
Step 3: Deploying the Image
Now that you have built your image you can now deploy it on your target device.
IBW Deployment
The first option is that you can use IBW to deploy the image in your WIM file. This may seem redundant as the point of offline building was to avoid IBW; however, one of the most resource hungry parts of the IBW image building process is applying the packages to the system. By using your developer machine to do the heavy lifting, IBW now only has to prep the HDD on your target device and apply the WIM file, as well as a few other administrative tasks.
In order to deploy using IBW, you need some way to transport your WIM file to the target device (USB key or other). Boot into your target system using the IBW, and on the first screen, you can select that you want to deploy a WIM file:
Follow the on-screen instructions and you’re good to go!
>setup.exe /installfrom:<path_to_wimfile> /answerfile:<path_to_answerfile>
Note: One can also deploy their custom WIM using Manual Deployment. This requires you to prep your device manually, by properly formatting the media, setting up the BCD, applying the WIM, etc. by booting into Win PE with the right tools. There are several caveats to using this method, some of which have been called out above. However, this can also save additional prototyping and deployment time. As such, this exercise is left for the reader, but if you want some tips, feel free to send me a message!
Cheers,
- Punit