Windows XP Unattended Setup with unattend.txt

Automating the installation of Windows XP relied heavily on an answer file named unattend.txt, which supplied pre-configured responses to the setup program's graphical and text-mode prompts. By defining user credentials, regional settings, network parameters, and product keys in advance, administrators could deploy the operating system across multiple machines without manual intervention. This article explains the structure of the unattend.txt file, its key configuration sections, and how it was used to streamline automated Windows XP deployments.

The Role of unattend.txt and winnt.sif

During a standard Windows XP installation, the setup process pauses repeatedly to ask for input, such as language preferences, product keys, licensing agreements, and network configurations. The unattend.txt script provides these parameters automatically.

When deploying from a network share or initiating setup from an existing operating system via winnt32.exe, the file was passed directly through command-line switches. However, when booting directly from a CD-ROM or ISO image, the setup loader specifically looked for a variation named winnt.sif placed inside the I386 directory of the installation media. Functionally, both files shared identical syntax and configuration directives.

Structure of the Answer File

The answer file is formatted as an INI-style plain text file, broken into distinct sections marked by brackets ([]) with associated key-value pairs.

[Unattended]

This section governs the behavior of the text-mode setup phase and general automation levels.

  • UnattendMode: Controls whether the user sees setup screens. Common values included FullUnattended (completely automated, no user intervention), DefaultHide, or ProvideDefault.
  • OemPreinstall: Set to Yes if deploying custom drivers, applications, or file structures stored in an $OEM$ folder.
  • OemSkipEula: Set to Yes to automatically accept the End User License Agreement.
  • TargetPath: Defines the destination installation directory, typically set to \WINDOWS or Auto.

[UserData]

This section supplies personalized machine and licensing data.

  • ProductKey: The 25-character volume license or retail CD key formatted with hyphens.
  • FullName: The name of the primary user or organization contact.
  • OrgName: The name of the company or department.
  • ComputerName: The NetBIOS name for the workstation (set to * to generate a random name based on organization details).

[GuiUnattended]

This block automates the graphical phase of the installation.

  • AdminPassword: Sets the local Administrator account password (or * for blank).
  • EncryptedAdminPassword: Indicates whether the password string is encrypted (Yes or No).
  • TimeZone: A numeric index specifying the system's time zone.
  • AutoLogon: Configures whether the system logs into Windows automatically after the final reboot.
  • AutoLogonCount: The number of times the system should bypass the login prompt before requiring manual authentication.

[Identification]

Determines how the machine joins the local network environment.

  • JoinWorkgroup: Assigns the computer to a standard peer-to-peer workgroup.
  • JoinDomain: Specifies an Active Directory or NT domain for the machine to join during setup.
  • DomainAdmin and DomainAdminPassword: Credentials required to authorize the machine account creation on the domain.

[Networking]

Specifies whether default or custom network components should be installed. Setting InstallDefaultComponents=Yes installs Client for Microsoft Networks, File and Print Sharing, and TCP/IP configured for DHCP.

Generating and Deploying the File

To simplify the creation of unattend.txt, Microsoft provided the Setup Manager tool (setupmgr.exe), located within the DEPLOY.CAB archive on the Windows XP installation disc under the \SUPPORT\TOOLS path. Setup Manager provided a wizard-based interface that generated syntactically correct answer files along with custom deployment batch scripts.

Once generated, administrators executed the unattended setup across local networks using the following command:

winnt32.exe /s:X:\i386 /unattend:unattend.txt

By combining unattend.txt with disk duplication tools or Remote Installation Services (RIS), organizations standardized and accelerated desktop deployments throughout the lifecycle of Windows XP.