Your message is highly valuable for us. One of our experts will follow up with you within 1-2 business days to discuss your request or to inquire for additional information if needed.
This article provides the description of basic steps and tips on how to create a “silent”, automated installation of an OS, configure it and test the result. Of course, on the Internet, there are quite a lot of articles and guidelines on individual stages of this task, but general instructions and answers to such questions as “What do I start with?”, “What needs to be prepared?”, “What are the main steps of the process?”, unfortunately, are rare.
That is why here are the answers for those who are dealing with this task for the first time.
Windows Embedded Standard 7×64 OS has been chosen as an example.
- Windows Embedded Standard 7 SP1 (Tools)
An evaluation version of Toolkit can be downloaded here.
Earlier versions of Windows include Windows System Image Manager (SIM) for editing response files. Windows SIM is a part of Windows Automated Installation Kit (AIK) which can be downloaded here. The interface of Image Configuration Editor in Windows Embedded Standard 7 Tools is very similar to that of Windows SIM.
- Original Windows installation ISO-image (+ a license key unless an evaluation version is installed)
- All required drivers for the target device
- Applications to be installed immediately after the installation of OS.
- 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
Before starting the process, it is recommended to get to know the following tools and phases of Windows installation.
Folder structure in operating environment:
Create a working folder, e.g. a folder named “Work”. Copy the contents of original Windows installation ISO-image into your working directory. The result looks as follows:
Please note that there are two subfolders in the Distribution Share (DS) folder: “$OEM$ Folders” and “Out-Of-Box Drivers”.
Create a folder “Work\DS\Out-of-Box Drivers\”. It will store necessary drivers for a target device.
Create a folder structure “Work\DS\$OEM$ Folders\(CustomFolder)\$OEM$\$$”. It will store additional files, applications, registry files, configurations and scripts.
The contents of \$OEM$\$$ folder are automatically copied into %WINDIR% folder, and thus can be used at any stage of installation. Read more about $OEM$ folders.
Sequence of steps for creating an automated OS installation:
Step 1. Creating a response file “AutoUnattend.xml”
Step 2. Adding drivers to an automated OS installation
Step 3. Adding applications and system settings via response files, scripts and commands
Step 4. Creating a test image
Step 5. Creating an image of a test machine and its deployment on target devices
These steps can be divided into substeps with many details. This article, however, gives only an overview of the task under completion.
1. Creating a response file “AutoUnattend.xml”
To make an installation fully automated, it is at least necessary to give answers to all questions of the Windows installation wizard, for which an XML-based response file contains all necessary fields.
Image Configuration Editor (ICE) can be used for creating and editing of an automated installation response file. For this purpose you can of course use any text editor, though without convenience and graphic interface of ICE specifically designed for this task.
ICE helps create a response file, add features, drivers and all necessary options making an installation fully automated.
An intuitive user interface and advanced search system give ICE an advantage over other tools for creating and editing a response file.
To start working with ICE:
- Open Distribution Share (DS): in this case it is “Work\DS”.
- Create a blank response file. Add features and options.
Windows Features are added according to the requirements of a target device. ICE can automatically add compulsory and optional features after you add a required minimum.
If your device is limited in disk space, note an Estimated Footprint index: this is an estimate of drive space that Windows will occupy after installation.
All features have one or several options. It is at least necessary to define the answers to the questions of standard installation such as default language of installation, agreeing to Microsoft® Software License Terms, product key, drive and partition for Windows installation, and local settings.
You can also specify the following settings of Windows® Welcome: language and region, user name, computer name, desktop wallpapers, date and time, current location, homegroup, wi-fi network, administrator password. All options are specified at one or several stages of Windows installation. Choose at which stage you are planning to define a specific option.
Hard drive configuration
At first stage of Windows installation (Windows PE), you can create and delete partitions of a physical drive. A set of options allows you to delete existing partitions, create new ones, specify their types and formats, letters and labels, choose a target partition for installation.
To create a new partition on the drive, right-click DiskConfiguration/Disk/CreatePartitions and select “Insert New CreatePartition“.
In the branching CreatePartition enter:
- the ordinal number of the partition being created (Order);
- type (Type) — Primary, EFI, Extended, Logical or MSR;
- size (Size);
- and specify whether the partition will be fixed-sized or extendable (Extend) — true or false. If Extend=true, there is no need to specify the Size option.
To specify additional parameters for created partitions, select «Insert New ModifyPartition» in the contextual menu for DiskConfiguration/Disk/ModifyPartitions option.
In the branching ModifyPartition that appears, enter:
- ordinal number (Order) — identical to the ordinal number in CreatePartition node;
- partition label (Label);
- partition letter (Letter);
- format (Format) — NTFS or FAT32;
- specify whether the partition will be fixed-sized or extendable (Extend) — true or false
- if the partition is active (Active) — true or false;
- partition type (TypeID). For example, assign TypeID the value of 0х27 for a system partition used to store system recovery tools.
With ImageInstall option, select the partition for installation.
Validating and saving a response file
To validate the response file, use F5. Warnings and errors will be displayed in the message pane.
If required packages were omitted, you can automatically add them using Ctrl+F5 combination.
Ctrl+Shift+F5 adds all required and optional packages. Using this option, remember that the footprint may be considerably exceeded.
The response file must be saved as “Autounattend.xml” into the root of working directory.
2. Adding drivers to an automated OS installation.
To add drivers to an automated installation, it is necessary to download them from the official website and
- to add the folder with installation driver files to Out-Of-Box drivers;
- to add a path to every driver at some stage of Windows installation. NOTE: a specific driver must be installed at a specific stage (at a specific phase).
3. Adding applications and system settings via a response file, scripts and commands.
To add extra files to the installation, use $OEM$ folder. $OEM$ directory and its subfolders are automatically recognized by the Windows installation and copied onto a hard drive. For example, all files and subfolders from “DS\$OEM$ Folders\\$OEM$\$$” will be copied into %WinDir%. You can run scripts and installation of applications directly from there.
To use the $OEM$ folder, do the following:
- In the response file, assign “true” to the “UseConfigurationSet” property
- Using ICE, unroll $OEM$ Folders in Distribution Share pane.
- right-click CustomFolder, then select “Insert Oem Folders Path”.
You can automatically install applications, specify their settings, add registry entries and files, using the followings techniques:
- RunSynchronous and RunAsynchronous commands in the response file.
- FirstLogonCommands in the response file. These commands are executed automatically with the user’s first system log-on.
- SetupComplete.cmd is launched automatically at the end of OS installation. Windows installation searches for SetupComlete.cmd file in the “%WINDIR%\Setup\Scripts” directory; that is why this file should be copied into“DS\$OEM$ Folders\(CustomFolder)\$OEM$\$$\Setup\Scripts” directory in the working folder.
Each of this techniques has its pros and cons, which should be considered as well the context of command execution.
For silent installation of applications, use the following keys during OS installation: s, /silent or /r с setup.iss file for InstallShield installation, /qn for MSI-packages, /verysilent /SP for InnoSetup, /s for Wiseinstaller, etc. Use help and/? option to learn about the command line options of application installation.
4. Creating a test image
A test image can be created as an ISO-image or as a bootable USB.
Here’s an example of how to create an ISO-image by using oscdimg tool (%ProgramFiles%\Windows Embedded Standard 7\Tools\AMD64\oscdimg.exe) when the Work folder is in the root of drive C.
oscdimg -bC:\work\boot\etfsboot.com -u2 -h m c:\work c:\work\wes7x64_test.iso
For the period of testing, we recommend including standard tools of testing of all required configurations (accessories, Microsoft management console, etc.) into installation.
5. Creating a test image and its deployment on target devices.
If you intend to create an image of a test machine and use it on target workstations, you first have to prepare the test machine using SYSPREP. Unless you meet this requirement, Microsoft does not provide the product support.
Sysprep prepares a Microsoft Windows installation for replication, auditing, and delivery to a client. Sysprep deletes the data of a specific system from Windows, e.g. ComputerSID. That is why the preparation with SYSPREP is an important step in creating the image.
You can create the image, using Windows PE with ImageX, or SymantecGhost tools. Windows PE Tools Command Prompt helps create a bootable WinPE image with automated generation of a wim-file whereas using Symantec Ghost\Ghost Boot Wizard, you can create a bootable Ghost image, automatically generating a ghost-file. Each of these images can be used for further delivery on target devices.
The resulting image can be used in lite-touch and zero-touch application deployment strategies.
Need help with application packaging and deployment? Learn more >