Solved

NIC information

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

948 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now