To automate Windows setup, you must first understand
the installation process. Knowing the underlying processes will help you
understand the decisions you must make when developing Windows Vista
for deployment.
The Windows Vista installation process is simple. All editions of Windows Vista use the same installation image
(Install.wim in the Sources folder of the installation media). The
product key determines which edition of Windows Vista installs. This
simplifies the installation process and allows the use of one basic
image to install all systems. The installation process is divided into
three phases: Windows Preinstallation Environment (Windows PE), Online
Configuration, and Windows Welcome.
Windows Setup runs in phases,
which the following sections describe. These phases—Preinstallation
Phase, Online Configuration Phase, and Windows Welcome Phase—occur in
order and simply designate a point in the installation process. Windows
Setup also has configuration passes (see the section “Setup Configuration Passes”). Each configuration pass performs a specific function and applies related settings from the Unattend.xml answer file.
You can customize the setup
process at many phases through the use of answer files. The following
list describes the answer files you use to customize the Windows Vista
installation experience:
Unattend.xml
The generic name given to an answer file that controls most unattended
installation actions and settings for most phases. When named
Autounattend.xml and placed in the appropriate folder, this file can
fully automate installations from the original Windows Vista media.
SetupComplete.cmd
While not actually an answer file, this file controls installation
activity at the end of the online configuration phase. You can use it to
copy files and settings or to install applications.
oobe.xml oobe.xml is a content file you use to customize the out-of-box experience: Windows Welcome, Welcome Center, and ISP Signup.
Preinstallation Phase
During the preinstallation phase, Windows Setup loads and prepares the target system for installation. Figure 1 illustrates where this phase fits in the installation process.
Tasks performed during this phase include:
Windows Setup configuration
Setup is configured by using either the Windows Setup dialog boxes
(interactive) or an answer file (unattended). Windows Setup
configurations include adding a product key and configuring a disk.
Windows PE configuration Answer files settings are applied during the Windows PE configuration pass.
Disk configuration The hard disk is prepared for image deployment. This might include partitioning and formatting the disk.
Windows image file copy
The Windows Vista image is copied to the disk from the distribution
media or a network share. By default, the images is contained in
Sources\Install.wim on the product media or distribution share.
Prepare boot information The Windows Vista boot configuration is finalized. This includes configuring single- or multiboot configuration settings.
Process answer file settings in the offlineServicing configuration pass
Updates are applied to the Windows Vista image, and packages—including
software fixes, language packs, and other security updates—are applied
to it.
Online Configuration Phase
During this phase, Windows Vista performs customization tasks related to the computer’s identity. Figure 2 shows where this phase fits into the overall process.
The Specialize pass,
which runs during this phase, creates and applies computer-specific
information. For example, you can use an unattended setup answer file
(Unattend.xml) to configure network settings, international settings,
and domain information, as well as run installation programs. You can
also copy files, install applications, and modify system configuration
by supplying a custom SetupComplete.cmd file to be run during this
phase.
During the Online
Configuration Phase, you can use scripts to install applications and
configure the destination computer. However, a task sequencer, which
enables you to filter tasks based on conditions, such as whether or not a
particular device is installed, is better suited to this purpose. A
task sequencer also provides advanced features such as the ability to
wait until a certain condition arises before continuing, and grouping
tasks into folders and then filtering the entire group. The companion
DVD includes a script-based task sequencer, Taskseq.wsf, that provides
all these advanced features and more. It reads tasks sequences from .xml
files and then executes them. The file Sample_Task_Sequences.zip
includes sample task sequences that demonstrate how to build. Do not run
these sample task sequences on production computers. Read the
documentation included in the source code for more information about
using Taskseq.wsf.
Windows Welcome Phase
In this phase, shown in Figure 3,
the installation is finalized and any first-use customizations you want
to apply are presented. You can customize the Windows Welcome screens
and messages and store these customizations in an oobe.xml file.
Setup Configuration Passes
Windows Setup makes
several passes, and you can configure each pass by using an answer
file. It is important to understand what is happening at each pass to be
able to configure settings and the place the settings at appropriate
pass. Table 1 lists the passes and describes what happens during each one.
Table 1. Windows Vista Configuration Passes
Pass | Description |
---|
windowsPE | Configures
Windows PE options as well as basic Windows Setup options, which can
include setting the product key and configuring a disk. |
offlineServicing | Applies updates to a Windows image. Also applies packages, including software fixes, language packs, and other security updates. |
specialize | Creates
and applies system-specific information. For example, you can configure
network settings, international settings, and domain information. |
generalize | Allows you to minimally configure the System Preparation tool (Sysprep) /generalize
command-line option, as well as configure other Windows settings that
must persist on your master image throughout the production environment. |
auditSystem | Processes
unattended setup settings while Windows is running in the system
context, before a user logs onto the computer in audit mode. The
auditSystem pass runs only if you boot to audit mode. |
auditUser | Processes
unattended setup settings after a user logs onto the computer in audit
mode. The auditUser pass runs only if you boot to audit mode. |
oobeSystem | Applies settings to Windows Vista before Windows Welcome starts. |
You
can apply some settings at more than one pass. For example, IP settings
would apply during the Windows PE pass to allow network access to
access image files, and also at the specialize pass to configure the IP
settings for the new operating system.