Automatically Install Display Drivers
Learn how to incorporate new or unusual display drivers into unattended NT installations.
September 30, 1998
Unattended installations for systems with video drivers NT doesn't recognize
You want to perform unattended Windows NT installations. You've dutifully read the section in Microsoft Windows NT Server 4.0 Resource Kit about writing installation scripts, you've studied the unattend.txt script that comes with NT, and you've tried a few automated installations with winnt or winnt32. (For more information about unattended NT installation, see "Related Articles in Windows NT Magazine," page 64.) But, you've found that automated installs work best when the drivers for your PC's hardware are on the NT installation CD-ROM.
Most new PCs contain a video card that didn't exist in July 1996, when Microsoft shipped NT 4.0. To run automated installs on a new machine, you must learn how to add new video drivers. Over the past couple months, I've described how to create powerful automated installation scripts for NT. This month, I'll show you how to automatically install display drivers.
SP3 Magic
I recently set up automated installs on a couple of new computers. The experience taught me that Service Pack 3 (SP3) helps smooth video card problems in unattended NT installations. First, I learned that if you have an Accelerated Graphics Port (AGP) video card, NT can't install the proper video driver until you install SP3. Second, I discovered that some PCI video cards don't work well under NT if you install them in PCI slot 0. Knowing whether your video card is in slot 0 is challenging because slot 0 is the closest slot to the edge of some motherboards, and it's the farthest slot from the edge of other motherboards. The motherboard's documentation might identify which slot is slot 0. However, if you can't figure out which slot to avoid, install SP3 to eliminate this problem.
The problem with these SP3 fixes is that you can't directly install SP3; you must install NT, then apply SP3. Is this problem insurmountable? Not at all. You really need to update only the hardware abstraction layer (HAL) to install AGP video drivers and to run a video card in PCI slot 0, and you can install the HAL from SP3 directly.
I assume that you have an i386 directory on a network share or local drive. In that share, you'll find all of NT's HALs, files with names such as hal.dl_, halast.dl_, halmca.dll, halmps.dll, and halncr.dll. The names that end with an underscore are compressed; some of NT's HALs come compressed, and some come uncompressed. Most systems use the basic hal.dll.
Move the HAL files from SP3 to i386: Place nt4sp3_i.exe into a directory, open a command prompt, and type
nt4sp3_i.exe /x
NT will transfer all of SP3's files into the nt4sp3_i.exe directory. Copy all files with names that begin with HAL from the new SP3 directory to your i386 directory. Then, when you install NT, the software automatically installs an SP3 HAL, and your AGP or slot-0 PCI video card's driver loads without trouble. You're now ready to set up your video drivers for a hands-off installation.
Unattended Installation Setup
Three files make up NT video drivers: an .inf file, a .sys file, and a .dll file. The .inf file is a text file that tells NT how to install the other two files. The .inf file tells NT which directories to place the other two files in; the .sys file usually goes in winntsystem32drivers, and the .dll file usually goes in winntsystem32. Don't let the fact that many video cards come with tons of other utility files confuse you. I haven't come across a video card that requires more than an .inf file, a .sys file, and a .dll file for unattended installation.
You need an $OEM$ directory in your i386 directory. Within $OEM$, create a directory called display. Place the .inf, .sys, and .dll files in i386$oem$display.
Add a [display] section to your unattend.txt file (your unattended setup script), if the file doesn't already have a [display] section. If unattend.txt already has a [display] section, edit the section to reflect your system's specifications. The section will look similar to the following example:
installdriver = 1
ConfigureAtLogon = 0
autoconfirm = 1
inffile =""
infoption = ""
bitsperpel = 8
xresolution = 640
yresolution = 480
vgacompatible = 0
vrefresh = 60
interlaced = 0
Installdriver = 1, ConfigureAtLogon = 0, and autoconfirm = 1 tell NT Setup to run the installation automatically and not stop and ask you for information. Capitalization in unattend.txt files doesn't matter, but spacing does. Be sure to leave a space on either side of the equal sign (=).
The bitsperpel, xresolution, yresolution, vgacompatible, vrefresh, and interlaced values describe the default video mode. You need to try to get these values right because video drivers can be finicky. For example, the drivers for the Chips and Technologies video chip in my Digital Equipment HiNote Ultra II work with an unattended setup only if I set the display to 800 * 600 and 65,536 colors.
Every video card I've encountered works fine without the vrefresh, vgacompatible, and interlaced values, but you need to specify the other parameters. How can you know the proper values for xresolution, yresolution, and bitsperpel? You have three possible strategies. One strategy is to perform an attended installation of NT, install the video driver, reboot, and see what resolution the system's display has. Then, you'll have the information you need to perform unattended installations on other systems with the same video card. The second strategy is to call the vendor to find out. When you finish laughing at the idea that a customer service representative might know the video card's required resolution, consider the third strategyguessing.
Ninety percent of motherboards work in 640 * 480 * 256 colors mode. Bitsperpel values include 8 (256 colors), 16 (65,536 colors), and 24 (16,777,216 colors), so you can probably get away with setting xresolution to 640, yresolution to 480, and bitsperpel to 8. If your video driver doesn't install with these values, you must experiment to find the right settings, so you might as well run an attended installation and discover the proper values.
The inffile parameter requires the name of the .inf file that you moved to i386$oem$display. The infoption parameter requires a colloquial description of the video card. You can decipher the .inf file to find your video card's description, but you have an easier option. Place your .inf, .sys, and .dll files on a disk and take the disk to a working NT machine. Open Control Panel, Display, and select the Settings tab. Click Display Type. The Display Type dialog box will appear; it tells you which drivers are currently loaded for your video card. Click Change, Have Disk. Insert the disk and click OK. The Change Display dialog box will appear. The video card's descriptive name will appear in the Display field. Place the descriptive name in the infoption parameter. Your unattend.txt file is ready to go.
I recently put a no-name video card based on the S3 ViRGE chip into a system and ran an unattended NT installation. The [display] section of my unattend.txt file read as follows:
[display]
ConfigureAtLogon = 0
autoconfirm = 1
inffile = "s3.inf"
infoption = "S3 Incorporated Display Driver v2.00.17"
installdriver = 1
bitsperpel = 8
xresolution = 640
yresolution = 480
vrefresh = 60
Parting Advice
Now that you know how to configure an unattended installation for a machine with a video card that NT doesn't recognize, you probably won't have any trouble with unattended installation of your video drivers. However, to increase the odds that you won't have problems, heed the following advice.
First, get the latest drivers. I don't have space to copy the previous sentence 100 times, but pretend that I did. I know that newer drivers often solve problems, but sometimes I forget that fact. I have spent days struggling with a troublesome driver, only to recall that I hadn't checked the vendor's Web site for the latest driver.
Second, understand that some video drivers will never install automatically. I bought a Creative Labs Graphics Blaster 3D and had no problem manually installing the appropriate drivers. But none of my unattended installation attempts succeeded. Microsoft folk told me that you can't perform unattended installations of the Graphics Blaster 3D because of how Creative Labs wrote the initialization code in the driver.
So, understand that not every unattended installation problem is solvable. Some installations must be attended, and knowing when to give up trying to perform an unattended installation can save you lots of trouble. Next month, I'll cover unattended SCSI installs.
About the Author
You May Also Like