Solved

NIC information

Posted on 2002-05-18
5
243 Views
Last Modified: 2010-04-04
Hello everyone,

How do I retrieve the following information from a workstation running Windows NT 4 (or better) or Windows 9.X (or better):

1) Type: ethernet or Token Ring?
2) Duplex: full or half?
3) Speed: 10/100 or 4/16?
4) Make/model/chip revision?

Any tips/hints/code samples are very much appreciated
Thanks
Vladimir
0
Comment
Question by:vladh
5 Comments
 
LVL 9

Expert Comment

by:ginsonic
ID: 7019293
listening
0
 
LVL 2

Expert Comment

by:freshman3k
ID: 7020190
Hello,

These may help,

http://www.jazarsoft.com/vcl/view.php3?id=16
http://www.mitec.d2.cz

I also know that this part of the registry,
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\Net

holds information on network card installed. Have a look with RegEdit , you might have to iterate a few branches in that key to find the info you need.

These links may help, but in VB

http://www.mvps.org/vbnet/index.html?code/wmi/wminetworkadapterconfig.htm
http://www.mvps.org/vbnet/index.html?code/wmi/wminetworkadapter.htm
0
 
LVL 2

Accepted Solution

by:
freshman3k earned 500 total points
ID: 7020193
P.S

Here is some code in Delphi,
http://community.borland.com/article/0,1410,26040,00.html

You can use the info from the VB site , and itegrate it with info from the Community site.
0
 
LVL 3

Author Comment

by:vladh
ID: 7044545
freshman,

Thanks for the tips and links. Registry information is not very accurate for several reasons:
1) on Windows 2000, it will retain information of all NICs ever installed (and maybe later removed) from the machine. If a NIC is physically removed from the box but the drivers are not, then the info will still stay in the registry.
2) Registry info will show the configuration settings, NOT the current running configuration. I.e. I can configure a NIC to Auto-Configure its speed (100/10) but the actual current speed is NOT saved in the registry. This is something I have to query the card to find out. In W2K, you have an indicator for each connection icon, telling you at what speed the NIC is running at the moment. This is the info I need.

Also, there are numerous examples out there telling you how to obtain a MAC address or IP address of a NIC. Most of these examples are too simplistic and are designed to work in an idealistically simple environment. Most MAC adress retrieval examples use NetBEUI to get the address, assuming the protocol is loaded on a machine and fail miserably when it is not. Most examples that retrieve IP address grab the first address they can find and declare victory - well, if I have 2 NICs in my machine (and sometimes more), I am out of luck because I can not control which NIC it goes after.

Generally speaking, all the examples I have seen so far are too high level, rely on a particular protocol (by assuming it is loaded and bound) and just do not provide the information I need. I beleive I need to query the actual NIC for the information and I should be able to list currently installed NICs and choose the one I am interested in.

Thanks
Vlad
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9005991
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept answer from freshman3k

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question