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)


Windows PE (for booting the Windows DVD or booting a custom Windows PE image)

  1. Specify Windows Setup configurations 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.
  2. Apply answer file settings in the windowsPE configuration pass.
  3. Configure the disk.
  4. Copy the Windows image to the disk.
  5. Prepare boot information.
  6. Process answer file settings in the offlineServicing configuration pass.

Online configuration

Create specific configurations, making the Windows installation unique.

Windows Welcome

  1. Apply answer file settings in the oobeSystem configuration pass.
  2. Apply content file settings from the Oobe.xml file.
  3. Start 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
    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


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.


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:

  • Setup is currently running and has not fully completed the phase. Once a given phase is complete, the IMAGE_STATE will be set to an appropriate completion value.
  • If queried online while Setup is not running, there was a failure when completing a Setup phase. This image must be reinstalled.
  • If queried offline, the image did not complete a phase and will never be deployable.


The image has successfully completed the generalize pass and will continue into OOBEsystem when Setup is initiated.


The image has successfully completed the generalize pass and will continue into audit mode when Setup is initiated.


The image has successfully completed the specialize pass and will continue into OOBEsystem when Setup is initiated.


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
  • To access state information from a file:

    C:\>type %windir%\Setup\State\State.ini

Windows Setup Log Files

Windows Setup logs all image-based setup actions in the following directories:

Log File Location Description


Log location before Setup can access the drive.


Log location when setup rolls back in the event of a fatal error.


Log location of setup actions after disk configuration.


Used to log Plug and Play device installations.


Location of memory dump from bug checks.


Location of log minidumps from bug checks.


Location of Sysprep logs.

Review the log files in these directories to assist in troubleshooting installations.