Retrieve NIC card name for use with typeperf

L

laphlaw

I need to do some network monitoring in the background while a program
I test is running. At the same time, I will be running some scripts on
this program, which require GUI interaction. Because of this, I chose
to use typeperf instead of perfmon... I don't want perfmon "getting in
the way".

My problem is the scripts will be running on different computers, which
will have different NIC cards. When using typeperf, you need the full
name of the NIC card. My question is, where is this name stored, and
how can I retrieve it... preferably something through the command line
so that it is transparent. Thanks
 
R

Ramesh, MS-MVP

You may try using a WMI script to get the Network adapter name, and then
launch the "typeperf....." command-line from the script itself.

- - -
Set objWMI = Nothing
Set objWMI = GetObject("winmgmts:")
Set objNetworkAdapters = objWMI.ExecQuery("select * from
Win32_NetworkAdapterConfiguration where IPEnabled = 1")
For Each objAdapter In objNetworkAdapters
MsgBox objAdapter.Caption
'Your typeperf commandline here....
Next
- - -

The above script lists the name of the network card.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


I need to do some network monitoring in the background while a program
I test is running. At the same time, I will be running some scripts on
this program, which require GUI interaction. Because of this, I chose
to use typeperf instead of perfmon... I don't want perfmon "getting in
the way".

My problem is the scripts will be running on different computers, which
will have different NIC cards. When using typeperf, you need the full
name of the NIC card. My question is, where is this name stored, and
how can I retrieve it... preferably something through the command line
so that it is transparent. Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top