Subscribe to Windows IT Pro
October 01, 1998 12:00 AM

Automatically Install Display Drivers

Windows IT Pro
InstantDoc ID #3863
Rating: (0)
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 \winnt\system32\drivers, and the .dll file usually goes in \winnt\system32. 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 ="<videocard.inf>"
infoption = "<descriptive name of video card>"
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 (=).

Related Content:

ARTICLE TOOLS

Comments
  • lawrence vander
    8 years ago
    May 06, 2004

    thank for a good work done

  • Vera Bondy
    9 years ago
    Nov 17, 2003

    please help: because of a Trojan worm my hard disk was formatted and almost everything reinstalled succesfully. But my driver for the videocard is gone (my flat screen monitor - IIyama - is connected to communication port)

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.