Windows Setup

Windows Setup is the installation process used to install Windows. Setup first prepares the system's hard drive ready for installation, and copies Windows system files, programs, services and drivers to the root of the installation drive, so that the computer can be restarted and Windows can be booted from the hard disk.

Classic Windows
DOS-based Windows versions up to Windows 95 require an existing installation of MS-DOS or IBM PC-DOS. The minimum version required differs between Windows versions. Early versions of Windows were installed by first starting DOS, inserting the first installation floppy disk, and running  from the root of the floppy disk. Windows 3.0 added the ability for Setup to automatically detect hardware, such as keyboards, mice, and display adapters.

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


 * WIN95.CAB, WIN98.CAB and WINME.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.

Windows XP and earlier
Since their inception, NT-based version used INF files to describe the file system layout and registry settings along with individually compressed files, similarly to other Microsoft products at the time. The user interface underwent multiple changes until its deprecation during Windows Vista development, but the key principles stayed the same.

In Windows NT versions prior to Windows NT 4.0, the installation had to be booted either by running  from the respective installation directory using a boot disk, or by using boot disks provided with the installation CD. In Windows NT 4.0, the installation CD-ROM was made bootable.

Due to the operating system files being stored in the  directory on x86 architecture media, it is also often called the i386 setup, although files for other architectures used different names for the directory. Inside that directory are operating system files that are usually compressed and had their last extension character replaced with an underscore. The files use 8.3 format filenames for compatibility with MS-DOS, with the full name stored inside. Although original media usually comes with most files compressed, the compression is optional.

The installation process consists of two major phases. The first phase runs in text mode using a minimal NT environment, usually booted directly from a CD-ROM disc. 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. It determines the hardware configuration, performs partition management, installs the core operating system and prepares for the next phase to run. The second phase 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 that allows the user to configure automatic logon. 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.

Windows Vista and later
Windows Longhorn build 4001 introduced the WIM installation format. This installation format boots the operating system via WinPE which launches the setup interface, the WIM file gets imaged to the computer's hard disk and the rest of the image gets worked around that.

Even though it was first introduced with Windows Vista, Windows XP can be imaged as WIM as well. 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.

The ESD (Electronic Software Distribution) format has been introduced with Windows 8.1. Compared to WIM, ESD files are smaller and cannot be mounted or edited without converting to WIM first.