Solved

NIC information

Posted on 2002-05-18
5
246 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 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

717 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