Using Windows Embedded Standard 7 you can quickly build an Operating System configuration that support your hardware and include only the components required to run your application.
Being able to customize the set of packages that are included in your image has multiple advantages:
- reduced footprint (you’ll save storage and memory giving more resources to your application)
- improved security (some services may have bugs that allows remote exploits and can become a security issue, removing them if they are not needed on your device will improve security)
- improved reliability (less code, less bugs ).
In Windows Embedded Standard 7 you can generate a set-up DVD or thumbdrive that can be used to install the operating system and your application on a target machine. Doing a full setup on each device could be a suitable solution, but it has some drawbacks. Setup may take a long time and may require some user interaction, some components may need to be installed or configured after the main OS setup etc. For those scenarios cloning is a more suitable alternative.
But you can’t clone a WES7 hard-drive and just use it to boot another machine. Every device has some local-ids that need to be unique and may prevent your cloned machines to operate when they are connected to a network. You need to remove those IDs from your machine before you clone its OS image. At the first boot the system will re-configure itself and generate new IDs.
To perform the “ID-cleanup” operation you can use the sysprep tool that is installed on every WES7 device inside the Windows\System32\Sysprep folder.
sysprep /generalize /oobe /shutdown
This command will remove machine-specific IDs and prepare your system for cloning. It will also shutdown the device, preventing any further configuration operation that may change its “clean” state.
If you restart the device you’ll discover that the system will ask for some of the same information (computer name, user account, time zone etc.) that you may have already configured using the Image Configuration Editor. This may be an issue if you want that all your devices have the same settings.
To prevent this you can take the answer file you used to create the Windows Embedded Standard 7 image currently running and open it inside a text editor. It’s an XML text file that you can edit.
You’ll have to remove the <servicing> node and all the settings nodes that are not involved in the syspref phase (leaving only <settings pass="oobeSystem"> and <settings pass="Specialize">). Then you can use this reduced version of your answer file to automate the post-sysprep phase.
sysprep /generalize /oobe /shutdown /unattend:<path to your XML file>
you’ll have a clonable image that will re-configure the device at first startup automatically, with no need of user interaction.