As mentioned before the Windows Setup exist from two phases know as the 'Textmode' phase and the 'GUI' phase. Adding storage drivers Textmode phase doesn't necessarily mean that the GUI phase is aware of the storage device presented by the driver. So if you add a driver to the Textmode phase of the setup and install Windows on the device presented by that driver, after the GUI phase has completed successfully and Windows has been installed, you will not be able to boot because the driver is not installed correctly. To avoid this, the driver must also be installed during the GUI phase.
If you're familiar with unattended installation you probably know about a feature called: 'OemPnPDriversPath', but unfortunately that option is not available in attended installations. So we have to come up with another solution. The GUI phase parses the %SystemRoot%\Inf folder for any information files present, if we could make sure the Textmode phase copies the driver .inf file to that folder, we would be save. Well that is, almost save. Actually there are two solutions; one simple and another more complex but more elegant. Both methods will be discussed here, the former being mandatory:
Preparing the modifications:
On the previous page we saw how the txtsetup.sif is constructed. So somehow we need to obtain the information to be able to modify our own txtsetup.sif and add our own driver. What we require is outlined below:
Now execute the following steps one-by-one.
Modifying the txtsetup.sif file:
First we need to add the files to the [SourceDisksFiles] section of the txtsetup.sif. To do that, open any text editor and add the two lines under the [SourceDisksFiles] section below in the txtsetup.sif file. The txtsetup.sif can be found in the \AMD64 directory of the installation source.
The line fasttx2k.inf = 1,,,,,,,20,0,0 has been added, although not necessary for Textmode mode storage detection, it is necessary by the GUI mode hardware detection. Remember, it parses the %SystemRoot%\Inf folder for existing .inf files. Notice the numbers 4 and 20 being bold. This is the destination folder where the files will be copied to. As mentioned on the previous page folders are mapped to numbers. For the complete list look at the [WinntDirectories] of the txtsetup.sif.
Also notice the 1 being bold. Of course the Windows Setup needs to know where the files are copied from. This is being controlled from the first field after the '=' sign. Now take a look at the list below.
As we can see from the list above, 1 equals: 1 = %cdname%,%cdtagfilea%,,\amd64. The line under [SourceDisksFiles] section, fasttx2k.sys = 1,,,,,,3_,4,1,,,1,4 copies the fasttx2k.sys from the \AMD64 folder to %SystemRoot%\Systems32\Drivers folder. Note: Changing the value of 1 to 11 would also work.
Now we need to add our own hardware ID's to the [HardwareIdsDatabase] section of the txtsetup.sif. The format should be similar to the following:
Next the driver needs to be loaded during the Textmode phase. To accomplish that, add the following entry to the [SCSI.load] section of the txtsetup.sif:
I would suggest to place this line direct below the atapi = atapi.sys,4 line. The atapi.sys is the first driver that is loaded, adding our driver direct below it, would make our Promise driver the 2nd driver loaded during the Textmode phase.
The last entry we have to add is the drivers Friendly name under the [SCSI] section of the txtsetup.sif file. To accomplish that, add the following line:
Now that we have our modified version of the txtsetup.sif file, save it and close the text editor.