PDA

View Full Version : Autodetect NIC in Unattend.txt - NT4



jlcollie
01-10-2002, 02:46 PM
This question probably requires someone that knows more about NT then WinBatch, but here goes anyways.

We have a WinBatch script which polls the PCI Bus Registry Key and tells us what NIC card is installed for Windows NT 4.0. Considering that we don't ever really know what NIC card will be in the PC until we look (we have a choice of 2, 3com andIntel), we'd like to see if we can autodetect this NIC during the Cmdlines.txt portion of Setup. We plan on forcing the driver to 3Com during the Network section of setup, then comes the Cmdlines.txt to detect the NIC card, if the Winbatch does not find the 3com card, we'll run a package which installs the Intel driver.

Has anyone tried something like this before?


Jeremy_Collier@agfg.com

Andy-S
01-10-2002, 04:10 PM
I have a DOS utility that can scan the PCI bus and determine what PCI devices are installed. This can be the first thing you run to determine the card installed. I'm sure I could modify it to scan for a NIC card and check the vendor ID for Intel or 3COM and write it to a file. Send me a mail if you want to try this. I could have it done for tomorrow.

jlcollie
01-10-2002, 04:24 PM
I appreciate the offer. I have found several DOS utilities that will do exactly that, but they will not work in NT. I know that NT can prevent direct access to the Hardware and this causes most of these DOS utils not to work. If yours works in NT, it would be great.

Andy-S
01-10-2002, 04:34 PM
Mine's will work in DOS before the OS loads. As you stated the HAL won't allow direct access to the hardware unless you use some of the Win32 API calls. My utility uses the PCI BIOS calls. You would have to run the utility first then load the OS.

jlcollie
01-10-2002, 04:39 PM
Thanks. This still may be a possibility. We could do the detection on the bootdisk, write a tempfile to the floppy, then in our Winbatch in the cmdlines.txt, we could check that tempfile for the detected nic and install the appropriate driver.

Let me run this past my team to see if that's the way they want to go.

Thanks for the reply.