Automated OS installation using Windows Embedded x64 as an example
Step-by-step instructions with examples

This article describes the basic steps and tips on how to create a “silent”, automated installation of the operating system, configure it and test the result. Of course, in the network you can find a fairly large number of articles and tips about the individual phases of such a task, but general instructions and answers to questions: Where to start? What needs to be prepared? What are the main steps of the process? - unfortunately, a rarity.
Therefore, the answers to these questions will be found here by those who perform such a task for the first time.
Windows Embedded Standard 7x64 selected as the operating system for examples.
Requirements for the working machine:
Should be installed:
- Windows Embedded Standard 7 SP1 (Tools)
Toolkit can be downloaded here (evaluation version)
In previous versions of Windows, Windows System Image Manager (SIM) is used to edit response files . Windows SIM is part of the Windows Automated Installation Kit (AIK), which can be downloaded here . The Image Configuration Editor interface in Windows Embedded Standard 7 Tools is very similar to the Windows SIM interface .
Must be available:
- The original ISO-image for installing Windows (+ license key, if you do not plan to install the evaluation version).
- All necessary drivers for the target device.
- Applications that are planned to be installed on the system immediately after installing the OS.
Basic tools:
- Windows Embedded Standard 7 SP1 (Tools) \ Image Configuration Editor (ICE)
- Windows Embedded Standard 7 SP1 (Tools) \ Windows PE Tools Command Prompt
- Symantec Ghost \ Ghost Boot Wizard
The folder structure in the working environment:
Create a working folder. For example, a folder named “Work”.
Copy the contents of the original ISO-image with the installation of Windows in your working directory. The result should be the following:


Note the two subfolders in the Distribution Share (DS) folder: “ $ OEM $ Folders ” and “ Out-Of-Box Drivers ”.
Create the folder “Work \ DS \ Out-of-Box Drivers \”. Here the drivers necessary for the target device will be stored.
Create the folder structure “Work \ DS \ $ OEM $ Folders \ (CustomFolder) \ $ OEM $ \ $$". Additional files, applications, registry files, configurations and scripts will be stored here.
Folder Contents \ $ OEM $ \ $$It is automatically copied to the% WINDIR% folder, so it can be used at any phase of Windows installation. More details about $ OEM $ folders.
The sequence of steps to create an automated installation:
Step 1. Create an AutoUnattend.xml response file.
Step 2. Adding drivers to the automatic installation process of the OS.
Step 3. Adding additional applications and system settings using the response file, scripts and commands.
Step 4. Creating a test image.
Step 5. Capture the image from the test machine and deploy to the target devices.
These steps can be divided into sub-items with many details. But in this article it is planned to give only a general vision of the implementation of the task.
1. Create an AutoUnattend.xml response file.
To make the installation fully automated, you must at least give answers to all questions of the Windows Setup Wizard. The response file in XML format contains all the fields necessary for this.
Image Configuration Editor (ICE) can be used to create and edit an automated installation response file. Of course, any text editor can be used for this, but without the convenience and GUI of an ICE focused on this task.
ICE allows you to create an answer file, add features, drivers, and all the necessary options to make the installation fully automated.
The intuitive user interface and advanced search engine make ICE a priority when choosing a tool for creating and editing a response file.

To get started with ICE:
- Open Distribution Share (DS): in our case it will be “Work \ DS”.
- Create a new (blank) answer file. Add components and options.
Features
Windows Features (in this text, hereinafter, the word “component” is used as the Russian equivalent) are added in accordance with the requirements of the target device. ICE can automatically add the necessary and optional components after you add the required minimum.
If your device is limited in disk space, pay attention to the Estimated Footprint indicator: this is the estimated size that Windows will take on the disk after installation.

Options
All components have one or more properties. At a minimum, you need to determine the answers to the questions of the standard installation : the default installation language, confirmation of the Microsoft Software License Terms, the product key, on which drive and in which section Windows will be installed, local installations.
You can also automatically set the following Windows Welcome settings : language and region, username, computer name, desktop wallpaper, date and time, current location, home group, wireless network, administrator password.
All options are configured on one or several phases of Windows installation. Pay attention to which specific phase you plan to configure a specific option.
Disk Setup
In the first phase of installing Windows ( Windows PE ), you can configure the creation and deletion of physical disk partitions. A set of options allows you to delete existing partitions, create new partitions, specify types, set formats, letters and labels for partitions, choose which drive Windows will be installed on.
To create a new disk partition for the DiskConfiguration / Disk / CreatePartitions option, select the " Insert New CreatePartition " action in the context menu .

In the resulting branching CreatePartition type:
- The serial number of the created section ( Order );
- Type ( Type ) - Primary, EFI, Extended, Logical or MSR;
- Size ( Size );
- And whether the partition will be a fixed size or expandable ( Extend ) - true or false. If Extend = true, you do not need to set the Size option
To add additional characteristics to the created partitions for the DiskConfiguration / Disk / ModifyPartitions option , select the “Insert New ModifyPartition” action in the context menu .

In the ModifyPartition branch that appears, enter:
- Sequence number ( Order ) - it must coincide with the serial number in the CreatePartition section;
- Section label ( Label );
- Section letter ( Letter );
- Format ( the Format ) - the NTFS or FAT32;
- Whether the section is a fixed size or expandable ( Extend ) - true or false;
- Section activity ( Active ) - true or false;
- Section Type ( TypeID ). For example, for the system partition used to store system recovery tools, TypeID should be set to 0x27.

The ImageInstall option allows you to choose which partition the operating system will be installed on.

Checking and saving a response file
To check the error response file use F5 . Warnings and errors will be displayed in the message bar.

If you missed the required packages, you can add them automatically using the keyboard shortcuts Ctrl + F5 .
Ctrl + Shift + F5 adds all required and optional packages. Using this option, you should pay attention to the fact that the footprint can be significantly exceeded.
The answer file should be named Autounattend.xml and saved in the root of the working directory.
2. Adding drivers to the process of automatic installation of the OS.
To enable the driver in the automatic installation, you must download them from the official site in advance and:
- Add a folder with driver installation files to Out-Of-Box drivers.
- Add a path to each driver in one of the Windows installation phases. Attention : a specific driver must be installed at a certain stage (in a certain phase).
3. Adding additional applications and system settings using the answer file, scripts and commands.
To add additional files to the installation, use the $ OEM $ folder . The $ OEM $ directory and its subfolders are automatically detected by the Windows installation and are copied to the hard drive.
For example, all files and folders from “DS \ $ OEM $ Folders \\ $ OEM $ \ $$” will be copied to% WinDir%. You can run scripts and install applications right from there.
To use the $ OEM $ folder, do the following:
- In the response file, set “UseConfigurationSet” to “true”
- In the Distribution Share panel in ICE, expand $ OEM $ Folders.

- Right-click on CustomFolder, and select “Insert Oem Folders Path”.
To immediately install applications immediately after installing the OS, set their settings, add registry entries and files, you can use the following methods:
- RunSynchronous and RunAsynchronous commands in the response file.
- FirstLogonCommands in the response file. These commands are executed automatically at the first user logon into the system.
- SetupComplete.cmd starts automatically at the end of the OS installation. Windows installation searches for a file named SetupComlete.cmd in the “% WINDIR% \ Setup \ Scripts” directory , so copy this file to the “DS \ $ OEM $ Folders \ (CustomFolder) \ $ OEM $ \ $$ \ Setup \ Scripts directory ” In the working folder.
Each of these methods has its pros and cons. And be sure to consider the context of the execution of commands.
For silent installation of applications during OS installation, use the appropriate keys: / s , / silent or / r with setup.iss file for InstallShield installation, / qn for MSI packages, / verysilent / SP for InnoSetup, / s for Wiseinstaller etc. Use help and the /? to familiarize yourself with the command line options for installing the application.
4. Creating a test image.
The test image can be created as an ISO image or as a bootable USB.
An example of creating an ISO image using the oscdimg tool (% ProgramFiles% \ Windows Embedded Standard 7 \ Tools \ AMD64 \ oscdimg.exe) for the case where the Work folder is located in the root of drive C:
oscdimg -bC: \ work \ boot \ etfsboot. com -u2 -hmc: \ work c: \ work \ wes7x64_test.iso
For test purposes, we recommend that you include standard tools in the installation for the duration of testing to verify all the necessary configurations (accessories, Microsoft management console, etc.).
5. Capturing an image from a test machine and deploying to target devices.
If you plan to make an image from a test machine and apply it on target devices, first you need to prepare a test machine using SYSPREP. This is a requirement from Microsoft. Otherwise, Microsoft does not provide product support.
Sysprep prepares a Microsoft Windows installation for duplication, auditing, and delivery to the client.
Sysprep removes system-specific data from Windows, such as ComputerSID. Therefore, preparing with SYSPREP is an important step in creating an image.
You can create an image using WindowsPE with ImageX or SymantecGhost tools .
Using WindowsPE Tools Command PromptYou can create a bootable WinPE image with automated creation of a wim file.
Using the Symantec Ghost \ Ghost Boot Wizard, you can create a bootable Ghost image with automated ghost file creation.
Each of these images can be used for further delivery to target devices.
The resulting image can be used in lite-touch and zero-touch deployment strategies .