Windows Text Mode Setup: A Guide to txtsetup.sif Configuration

    This article explains how Windows text mode installation works and how the plain-text configuration file txtsetup.sif controls it. It covers the three core section types for source locations, target directories, and file copy rules, breaks down each comma-separated field in a copy rule, and shows how driver integration relies on the load order, hardware ID, and description sections working together. It also outlines the differences between fresh and upgrade registry hive paths, the paired actions required when adding or removing entries, common failure symptoms, and practical version-control advice for custom installation media.

    1. Why Text Mode Setup Depends on This Configuration

    Early Windows installation was split into two phases with fundamentally different characteristics. The first phase ran in a minimal execution environment that retained only memory management, a basic file system, and the most essential driver framework. It had no full graphical interface and no mature plug-and-play service, and it is commonly referred to as text mode setup. Only in the second phase did the system switch to a graphical environment to continue with device enumeration, service registration, and user configuration.

    The text mode phase has just three core tasks: copy the files required for installation from the media to the target partition, load the necessary storage controller drivers into the kernel ahead of time, and build the initial registry hive skeleton. The description of these three tasks lives in a plain-text installation configuration file named txtsetup.sif. It ships with the installation media, located in a directory such as I386 at the root of the media. The setup program reads it early in startup and uses it to decide “where to take files from, where to put them, and in what order to install drivers.”

    One easily overlooked but very important characteristic is that this file serves only the installation phase and is not copied into the system directory afterward. Two direct consequences follow. First, it is outside the monitoring scope of the system file protection mechanism and will not be automatically repaired to its original version later. Second, it does not participate in the digital signature verification process for system components, so modifying it does not trigger a signature failure prompt. This is precisely the structural precondition that makes custom installation media possible.

    2. The Three Core Section Types

    The semantics of the configuration file are defined by sections. Section names are wrapped in square brackets, and each line within a section follows a “key = value” structure. Understanding the three core section types gives you the main logic of file copying.

    The first type is the source location section, typically named [SourceDisksNames.x86]. It assigns a number to each source and declares the media label and path where that source resides. The architecture suffix here means the same file can maintain independent source lists for different processor architectures without interfering with each other.

    The second type is the target directory mapping section, typically named [WinntDirectories]. It also uses numbers, but it describes where files land in the target system. The root is the system folder specified at installation time (usually written as %WinDir%), and the remaining numbers correspond to subdirectories under the system folder or fixed locations such as the program files directory.

    The third type is the copy rule section, typically named [SourceDisksFiles]. It binds file names to the numbers from the previous two section types, declaring which source a file is taken from and which target directory it is placed in, while additional fields control attributes, version decisions, and special handling.

    The illustrative line structure below is only meant to explain field meanings and is not a usable configuration:

    1. [SourceDisksNames.x86]
    2. 1 = %cdname%,%i386%,,
    3. 2 = %cdname%,%i386%,\driver\storage,,
    4. [WinntDirectories]
    5. 1 = system32
    6. 2 = system32\drivers
    7. 100 = OEM
    8. [SourceDisksFiles]
    9. example.sys = 1,,,,,,,2,0,0

    In this example, example.sys comes from source number 1 and lands in target directory number 2, the drivers subdirectory under the system directory. Fields are separated by commas, and their positions are fixed and cannot be added or removed arbitrarily.

    3. Field-by-Field Breakdown of a Copy Rule

    The example line given in the original text contains nine comma-separated positions, with meanings summarized as:

    1. locsecw.chm = 1,,,,,,,21,0,0
    • Field 1: the file name, which must be a file that actually exists in the installation source.
    • Field 2: the source number, where 1 means the original distribution media. A common 100 usually means a custom additional source, whose definition is also written in the source location section; this is the number most often used when integrating third-party content.
    • Fields 3 to 8: reserved positions, left empty in most scenarios, used for special markers or language and version restrictions.
    • Field 9: the target directory number, where 21 corresponds to the help documentation directory under the system directory.
    • Fields 10 and 11: control bits, generally kept as 0,0.

    Field position sensitivity is the first principle of troubleshooting. One extra comma shifts the meaning of all subsequent fields, and the symptom is often that a file is placed in the wrong directory rather than a clear error.

    4. Sections and Ordering Involved in Driver Integration

    To make the setup program recognize a non-default storage controller in text mode, three sections must work together:

    • [SCSI.Load]: determines the driver load order; the earlier a driver appears, the earlier it enters the kernel. A wrong order can leave the setup program unable to find the controller before it reads the target partition.
    • [HardwareIdsDatabase]: associates hardware identifiers with driver names, which the setup program uses to match enumerated devices to specific drivers.
    • [SCSI]: provides a human-readable description of the driver, mainly affecting UI display and log readability.

    The minimum complete change set is: the driver file itself enters the source list and target directory mapping, the hardware identifier enters the association section, and the load order enters the load section. Adding only the file without the association leaves the device unrecognized; adding only the association without the load order may mean the driver is not ready before it is needed.

    5. Differences Between the Registry Skeleton and the Upgrade Path

    [HiveInfs.Fresh] and [HiveInfs.Upgrade] target fresh installations and upgrade installations respectively, and both write registry keys into the initial hive through a specified information file. The two cannot be mixed: a fresh installation that takes the upgrade branch may write keys that lack default entries, and the reverse may overwrite existing configuration. During customization, check them as a pair to avoid changes that take effect on only one path.

    6. Paired Actions for Adding, Removing, and Modifying Entries

    The safest way to remove a line is to add a semicolon at the beginning to comment it out, preserving a trace for later review. But changing only this file is often not enough: the installation phase file list is usually described by two files together, and when removing an entry you must also remove the corresponding line from the other list. Otherwise the setup program still tries to fetch the removed file and aborts during the copy phase with a missing-file error.

    Adding a line is more complex and must satisfy several conditions at once: the file actually exists at the specified source path, both the source number and target number are defined, driver-type files have all three sections in place, and the other list stays consistent. The recommended verification order is to make a small incremental change first, then verify with a fresh installation in a virtual machine, and finally verify the upgrade path.

    7. Common Failures and How to Locate Them

    • Missing file reported during the copy phase: first check file name casing, the source path, and consistency with the other list.
    • Hard disk not recognized early in installation: check the load order and the spelling of hardware identifiers, and confirm the driver architecture matches the installation media architecture.
    • File landing in an unexpected directory: check whether the target number is shifted, usually caused by an extra comma.
    • Changes not taking effect at all: confirm the media uses this file rather than a version with a different architecture suffix, and confirm the change was written to the media actually being read.

    8. Practical Recommendations

    Treat the customization process as a version-managed object: keep a copy of the original file and record the reason for each change. Keep changes concentrated on additional source numbers to minimize interference with the original numbers, and after each change verify both the fresh installation and upgrade installation paths. If you reproduce the experiment in a cloud environment, you can use general-purpose service categories to host and distribute custom media, for example using object storage to hold images, a container platform to build a temporary validation environment, and a logging service with monitoring alerts to track installation output, so you can repeatedly run regression checks under controlled conditions and reduce the risk of trial and error directly on production media.