?
Solved

NIC information

Posted on 2002-05-18
5
Medium Priority
?
247 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month9 days, 9 hours left to enroll

762 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