Microsoft Windows for 64-bit Extended Systems

Adding OEM drivers to Windows Setup - Part #2, The txtsetup.sif explained:

Background:
Windows Setup uses a number of key key files to control how the Windows Setup behaves. This mechanism dates back to the Windows NT era. If you are able to control these files, you are controlling how Windows Setup behaves. For now you need to be aware of three files:
  • DOSNET.INF - Used by WINNT.EXE/WINNT32.EXE during the file copy phase of the Setup.
  • LAYOUT.INF - Used as a template for file copy operations. DO NOT EDIT THIS FILE!
  • TXTSETUP.SIF - Used by the textmode phase of the Setup and prepares for the GUI phase of the Setup.
The textmode phase is invoked after the reboot from the copy phase or when booting from the installation CD-ROM. This article will be limited to adjusting the txtsetup.sif file only, since most installations will be initiated from a bootable installation CD-ROM.


Textmode and the txtsetup.sif file:
As mention before the txtsetup.sif file is used by textmode phase of the Windows Setup and largely controls how the Windows Setup behaves. Among the tasks the textmode phase performs, are the following:
  • Preparing the filesystem for installation (formatting, creating folders).
  • Copy the basic Windows files needed to start the GUI phase to the destination folders.
  • Loading setupreg.hiv needed by the GUI phase and preparing the Initial Registry configurations.

Txtsetup.sif sections:
Every information file is divided into sections. Sections can be identified by brackets, eg. '[MySection]'. For adding OEM drivers so the storage hardware can be used by the Textmode phase of the Windows Setup the following sections are important to be aware of:

  [WinntDirectories]
  1 = "\"
  2 = system32
  3 = system32\config
  4 = system32\drivers
  18 = system32\spool\drivers\amd64
  20 = inf
  [SourceDisksFiles]
  dummy.sys = 1,,,,,,3_,4,1,,,1,4
  [HardwareIdsDatabase]
  PCI\VEN_9999&DEV_1234 = "dummy"
  [SCSI.load]
  dummy = dummy.sys,4
  [SCSI]
  dummy = "Robert's Dummy Storage Driver (AMD64)"

Although 'Dummy' is used as an example entry, if a 'dummy.sys' would actually exist on the installation media and the above entries would have been added to the 'txtsetup.sif' the Textmode phase of the Windows Setup would have displayed in the status bar of the screen 'Loading Robert's Dummy Storage Driver (AMD64)...'.


[WinntDirectories]
This section maps a physical directory, either absolute like '\' or relative to %SystemRoot%. The folder is identified throughout the Windows Setup by the number it was assigned to. Eg. '4 = system32\drivers' maps the number '4' to '%SystemRoot%\system32\drivers'.


[SourceDisksFiles]:
This section controls how source files are copied to their destination and what their properties will be, eg. The file 'dum__.inf' can be copied to '%SystemRoot%\Inf\dummy.inf' with the line: 'dum__.inf = 1,,,,,,,20,0,0,dummy.inf'.


[HardwareIdsDatabase]:
This sections holds the mapping of physical PCI resources that will be controlled by the various drivers. In the above example the driver identified by the name 'dummy' controls a piece of hardware that identified by the following PCI Vendor ID and PCI Device ID: 'PCI\VEN_9999&DEV_1234'. If there are multiple drivers that control the same PCI Vendor ID and PCI Device ID we can expect a bugcheck. If the wrong information is entered here for Storage hardware, you definitely get a bugcheck '0x0000007B' better known as: 'INACCESSIBLE_BOOT_DEVICE'.


[SCSI.load]
You can add as many drivers as you want, but if the Windows Setup doesn't load them, they can not be used during the setup. This section controls if the various drivers are loaded during initialization and in what order. This section is processed from top to bottom, so drivers listed first are loaded first. So, dummy = dummy.sys,4 loads the driver 'dummy.sys' from the folder '%SystemRoot%\System32\Drivers'

note: It's relative to the destination folder!.


[SCSI]
If Windows Setup would display 'Loading dummy.sys...' we still wouldn't know what kind of driver (except for its name) is being loaded. Displaying something like 'Loading Robert's Dummy Storage Driver (AMD64)...' looks much better. That is the primary function for this section, displaying a 'friendly name'. The format is something like: 'driver_name = "Friendly Name"'. The 'Friendly Name' part can be any text, but it's custom to use a string that can be found in either the drivers 'txtsetup.oem' or 'driver.inf', but more about that in the next part of this article.


<-- PREVIOUS: Introduction

Modifying the txtsetup.sif :NEXT -->

Related links:
Updates:
Comments, ideas or suggestions:
Can be sent to: amd64@collosumus_NOSPAM_.net, please remove the _NOSPAM_ from the e-mail address. You can't be too careful with spam these days.


Last update: 01/12/2004.