Windows Setup

Windows Setup is the utility used to install the Windows operating system. Setup first prepares the system's hard drive for installation and then copies system files, programs, services, and drivers to the root of the installation drive allowing Windows to boot from the hard disk. After Windows is started for the first time, devices are set up, components are registered, and users set up their accounts.

Windows 1.0 and Windows 2.x
Windows 1.0 featured a very rudimentary setup application. The installer asks for the target drive, directory and hardware configuration, and then proceeds to install the operating system. There is no option to load custom drivers from the setup, with the user instead having to copy the drivers on the disk manually. In order to optimize performance, the installer also combines crucial system files into a single  file using what is called "Fast Boot". There is no support for changing a single part of the system, as the entire environment has to be clean installed in order to do that, erasing any configuration in the process.

Unlike later versions, the Windows 1.0 setup has no easily accessible settings. Instead, the executable is compiled specifically for each disk size. Furthermore, the available drivers are determined dynamically by the setup without previous configuration.

Windows 2.0 kept a similar user interface for setup as previous versions, although it introduced many back-end changes. Notably, it introduced, a plaintext configuration file, which contained a list of system files and included drivers, as well as other settings. The setup also now supports loading custom drivers from the application itself. However, Windows 2.x did not support upgrading a previous version of Windows. Any previously installed version of Windows is overwritten, and any settings must be transferred across manually from the  file.

Windows 3.x
Windows 3.0 introduced a new, more advanced installer. The black background for the setup has been replaced with a blue background with a grey bar showing the current tasks that the installation is performing. After the core Windows system files have been copied, it launches into a Windows-based GUI environment to complete Setup. From there, the remaining Windows files are copied and components are set up. This version also introduced the ability to upgrade a previously installed version of Windows by running Setup from within DOS. Upgrading a previous version transfers all its settings stored in the  file across to the newer one. Windows 3.1 introduces the ability for the user to enter their name and company.

Windows 9x
Windows 9x versions do not require an existing version of DOS to install. However, a boot disk was still required in most cases as most Windows 9x installation media was not bootable. The installation process prepares a partition, checks it using ScanDisk, and copies files to the hard disk.

In Windows 9x versions, .CAB files are used for the installation. Mostly known .CAB installation files include:


 * WIN95_*.CAB, WIN98_*.CAB (WIN9X_*.CAB in early Windows 98 builds) and WIN_*.CAB: They contain the main system apps and files.
 * DRIVER*.CAB: Contains the driver files for Windows.
 * NET*.CAB: Contains networking and internet components.
 * MINI.CAB: Contains basic files required to start the installation from within DOS. This environment is based on Windows 3.1.

If starting the installation process from DOS, the Windows 3.1-based environment in the  file is used to start Setup. During this stage, the user configures various settings of the installation, and the Windows system files are copied to the hard disk. However, Setup can also be run from within an existing Windows 3.1 or 9x environment, skipping this portion. Once the files are copied, Setup restarts the computer, sets up devices and configures system settings.

Windows Server 2003 and earlier
During its development, Windows NT adopted a modified version of the Windows 3.1 setup process. Similarly to it, the setup configuration is stored in INI-formatted text files, although unlike its DOS-based counterpart the text mode configuration uses a separate configuration file. All files use 8.3 format filenames for compatibility with MS-DOS, often with the last extension character replaced with an underscore to mark that the file is compressed, with the full name stored inside the setup configuration. Although original media usually comes with most files compressed, the compression is optional.

The operating system files are stored in a folder named according to the intended platform along with the setup configuration. This made it possible for the same disc to contain installation files for multiple architectures, which in turn allowed all versions to be shipped in the same package up to Windows NT 4.0. As the files for 32-bit x86 systems were stored in the  directory, this particular setup process is often referred to as "i386 setup". Other directory names included,  ,  ,   and   for DEC Alpha, MIPS, PowerPC, Itanium and 64-bit x86 respectively. Media for the last two architectures also include a  directory, although unlike early versions it does not contain a self-contained 32-bit x86 build, but rather the files required for WoW64 with the file names prefixed by the letter W.

Similarly to Windows 3.1, the installation process consists of two major phases. The first phase usually runs in text mode and is usually booted directly from the install media. It may optionally be preceded by running the Setup in an existing Windows environment or by running  from MS-DOS, which would copy the first phase environment to the boot disk and then reboot into it. When upgrading to Windows XP or Windows Server 2003, this stage runs in 16-color graphical mode and shows a static billboard together with a progress bar and a marquee animation, although it accepts no input and falls back to text mode when an error is encountered.

When booting into the first stage, the setup determines the hardware configuration and loads drivers as specified in the configuration. It then proceeds to start the minimal NT environment on the install media, which had its Session Manager component replaced with a simple native application that passes control to the setup driver. When it finishes loading, it displays a welcome screen which allows the user to continue the installation or repair an existing copy of Windows. The Recovery Console can also be invoked at this point in Windows 2000 and later.

The next pages of the first stage include the license agreement and partition management. After the setup checks the partition for errors, it copies a more complete system to the disk and prepares the system for the second stage to run by generating the registry and writing the boot loader. The system is then rebooted into the second phase, which runs in graphical mode and installs the rest of the operating system, as well as configures the network, date/time and asks for a product key.

Starting with Windows 2000, the Network Identification Wizard runs at first boot to configure user name and password, along with a choice to log on to a specific user automatically. This evolved into a full-on out of box experience with Windows XP, allowing the user to easily configure network settings, user accounts, and Automatic Updates.

The user interface underwent multiple changes until its deprecation during Windows Vista development, but the key principles stayed the same. Windows NT 3.5 introduced a  program so that Setup could be started from within an existing Windows installation. In Windows NT versions prior to Windows NT 4.0, the installation had to be either prepared by running  from the respective installation directory using a boot disk, or booted by using floppy disks provided with the installation CD. In Windows NT 4.0, the installation CD-ROM was made bootable, although boot disks were still available for Windows 2000 and XP. The amount of boot disks has been increased from three for NT 3.x and 4.0 to four for Windows 2000 and finally to six for Windows XP due to support for new technologies.

Windows Vista/Server 2008 and later
Windows Longhorn build 4001 introduced the WIM installation format. This installation format boots the operating system via WinPE which launches the main setup user interface. The user configures multiple aspects of the installation, such as what SKU of Windows the user would like to install, what disk or partition Windows should be installed, and whether the user would like to perform an upgrade or clean installation. The setup is booted via the  file on the installation media.

The install process works by deploying a pre-packed WIM image to the hard disk where Windows should be installed. Though, in Build 4002 they used the i386 Setup. When they reset the development, the early builds used the i386 setup. However, in build 5048, the setup is also booted from the install image itself. The image index determines what SKU of Windows will be installed. From Windows 8 onwards, the DISM command line tool is used to deploy the image to the location where Windows is installed. After the WIM image is applied, the installer creates boot files on the hard disk, and restarts the machine so that devices can be set up, and the OOBE can be run. If there is an already existing version of Windows on the hard disk where the user chose to install Windows, the existing Windows installation is moved into the  directory.

The Recovery Console has been replaced with Windows Recovery Environment and can be launched by selecting "Repair your computer".

Even though it was first introduced with Windows Vista, Windows XP-based Windows releases can also be packaged in WIM format. Examples can be seen in the Windows Embedded for Point of Service and Windows Fundamentals for Legacy PCs operating systems. Setup graphical assets are stored in spwizimg.dll on Windows Vista and later; Windows Longhorn pre-reset builds store them in win32ui.dll and win32uitheme.dll. Windows 8.1 introduced the ESD (Electronic Software Distribution) format. Compared to WIM, ESD files are smaller, but cannot be mounted or edited without converting to WIM first.