Windows Setup Installation Process
Windows Setup is the program that installs Windows or upgrades an existing Windows installation. Windows Setup is also the basis for the following installation and upgrade methods: interactive setup, unattended installation, and Windows Deployment Services (Windows DS).
Windows Setup Installation Types
Windows Setup can perform custom and upgrade installations. Windows Setup cannot perform computer-to-computer migrations. Instead, you must use the Migration Wizard.
- Custom installations: Windows Setup can perform a clean installation, which saves your previous Windows installation, but does not migrate your settings. The previous Windows installation will not boot after performing a clean installation.
- Upgrade installations: Windows Setup can perform an installation that retains your settings and preferences while upgrading your operating system.
Windows Setup Process
The Windows Setup program starts and restarts the computer, gathers information, copies files, and creates or adjusts configuration settings. The following table shows the overall process for Windows Setup:
Windows Setup Phase | Setup Actions |
---|---|
Downlevel (for custom installations and upgrades) -OR- Windows PE (for booting the Windows DVD or booting a custom Windows PE image) |
|
Online configuration |
Create specific configurations, making the Windows installation unique. |
Windows Welcome |
|
Booting to Audit Mode or Windows Welcome
There are two modes that a Windows Vista installation can boot to:
- Windows Welcome
Windows Welcome, also called Machine OOBE (out-of-box experience), is the first user experience and enables end users to customize their Windows installation. End users can create user accounts, read and accept the Microsoft Software License Terms, and choose their language and time zones.
By default, all Windows installations boot to Windows Welcome first. - Audit Mode
Audit mode is used by OEMs and corporations to add customizations to their Windows images. Audit mode does not require settings in Windows Welcome to be applied. By bypassing Windows Welcome, you can access the desktop quicker and make your customizations. You can add additional device drivers, install applications, and test the validity of the installation.
For more information about audit mode, see Customize Windows in Audit Mode.
Oobe.xml Content File
In addition to the unattended Setup answer file, you can use the Oobe.xml content file to configure what a customer sees the first time they boot Windows. Settings in an Oobe.xml content file are applied after the oobeSystem configuration pass, before Windows Welcome starts.
Oobe.xml is a file that is used to collect additional text and images for customizing Windows Welcome, Welcome Center, and ISP Sign-up. If you build a single Windows image that contains multiple languages and can be delivered to more than one country, you can add multiple Oobe.xml files to customize the content based on the language and country/region selections of the end user.
For more information about using the Oobe.xml answer file, see the Oobe.xml Technical Reference.
Automatically Running Scripts after Windows Setup Completes
You can make additional customizations to your Windows installation by adding commands to the %WINDIR%\Setup\Scripts\SetupComplete.cmd file. This file enables you to install additional applications or make other modifications to the system before a user logs in. You can use the SetupComplete.cmd file to run custom Windows scripts (cscript/wscript).
In addition, if Windows Setup encounters a fatal error, you can configure the system to automatically run a script. For more information, see Add a Custom Script to Windows Setup.
Windows Setup States
There are several "states" assigned to a Windows image during installation. This state information can be used to automatically detect the different states and stages of Windows Setup.
The Windows image state is stored in two places, in the registry and in a file.
- In the registry:
KEY: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State
TYPE: REG_SZ
VALUE: StateName - In a file:
FILE: %WINDIR%\Setup\State\State.ini
SECTION: [State]
VALUE: StateName
The following table describes the different values that exist for StateName.
State Name | Description |
---|---|
IMAGE_STATE_COMPLETE |
The image has successfully been installed. The specialize and oobeSystem passes are complete. This image is not deployable to alternate hardware because it is now hardware-dependent. |
IMAGE_STATE _UNDEPLOYABLE |
This is the default state for an image in a given phase of Windows Setup that is not yet complete. If a process queries the IMAGE_STATE value and IMG_UNDEPLOYABLE is returned, the image is in one of the following states:
|
IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE |
The image has successfully completed the generalize pass and will continue into OOBEsystem when Setup is initiated. |
IMAGE_STATE_GENERALIZE_RESEAL_TO_AUDIT |
The image has successfully completed the generalize pass and will continue into audit mode when Setup is initiated. |
IMAGE_STATE_SPECIALIZE_RESEAL_TO_OOBE |
The image has successfully completed the specialize pass and will continue into OOBEsystem when Setup is initiated. |
IMAGE_STATE_SPECIALIZE_RESEAL_TO_AUDIT |
The image has successfully completed the specialize pass and will continue into audit mode when Setup is initiated. |
The following examples show how to access state information.
To access state information from the registry:
C:\>reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State /v Imag eState HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State ImageState REG_SZ IMAGE_STATE_SPECIALIZE_RESEAL_TO_OOBE
To access state information from a file:
C:\>type %windir%\Setup\State\State.ini [State] ImageState="IMAGE_STATE_SPECIALIZE_RESEAL_TO_OOBE"
Windows Setup Log Files
Windows Setup logs all image-based setup actions in the following directories:
Log File Location | Description |
---|---|
$windows.~bt\sources\panther |
Log location before Setup can access the drive. |
$windows.~bt\sources\rollback |
Log location when setup rolls back in the event of a fatal error. |
%WINDIR%\panther |
Log location of setup actions after disk configuration. |
%WINDIR%\inf\setupapi*.log |
Used to log Plug and Play device installations. |
%WINDIR%\memory.dmp |
Location of memory dump from bug checks. |
%WINDIR%\minidump\*.dmp |
Location of log minidumps from bug checks. |
%WINDIR%\system32\sysprep\panther |
Location of Sysprep logs. |
Review the log files in these directories to assist in troubleshooting installations.