|
-
May 11th, 2005, 07:12 PM
#1
Thread Starter
New Member
Detect Connection Device Name [RESOLVED]
Hello everyone,
I've been making a simple updater type program and I have litterally hit a speed bump. If people are not on a 10 BaseT I need to prevent the program from downloading the larger files.
Here is the kicker, the Air Card that some of these people use show up as a LAN connection but it is really only as fast as a 28.8 dialup. So I need to detect the name of the card/device that is actually being used for the connection.
Ideas, suggestions, any help will be very appreciated.
Zheldon
Last edited by Zheldon; May 12th, 2005 at 05:57 PM.
Reason: All Done, resolved.
-
May 11th, 2005, 08:44 PM
#2
Thread Starter
New Member
Re: Detect Connection Device Name
Well I think I might have found my own answer, or at least a good path to start down. If some one knows better please let me know.
http://support.microsoft.com/?kbid=223025
-
May 12th, 2005, 01:38 AM
#3
Member
Re: Detect Connection Device Name
I know know if this could help, but if I'm not mistaken can you request the name with the snmp protocol.
Here is a library (don't know if this one is any good)
http://www.c-sharpcorner.com/Code/2002/Sept/SnmpLib.asp
Also look at this
http://www.experts-exchange.com/Prog..._20592398.html
-
May 12th, 2005, 12:13 PM
#4
Re: Detect Connection Device Name
If the devices with the AirCard do not have any other network adapters enabled, then this will tell you the name of the Instance Name of the adapter.
I have a 1394, and two for the 10/100 adapter, all enabled. (NDis = 0)
Active: True
InstanceName: Broadcom 802.11b/g WLAN
NdisTransmitsOk: 370459
Active: True
InstanceName: HP WLAN 54g W450 Network Adapter - Packet Scheduler Miniport
NdisTransmitsOk: 370459
VB Script (.vbs) Open with cscript or wscript. Search for recent posts by me.
VB Code:
On Error Resume Next
Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
arrComputers = Array("MYPCNAME")
For Each strComputer In arrComputers
WScript.Echo
WScript.Echo "=========================================="
WScript.Echo "Computer: " & strComputer
WScript.Echo "=========================================="
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\WMI")
Set colItems = objWMIService.ExecQuery("SELECT * FROM MSNdis_TransmitsOk", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem In colItems
WScript.Echo "Active: " & objItem.Active
WScript.Echo "InstanceName: " & objItem.InstanceName
WScript.Echo "NdisTransmitsOk: " & objItem.NdisTransmitsOk
WScript.Echo
Next
Next
-
May 12th, 2005, 05:57 PM
#5
Thread Starter
New Member
[resolved]
Thanks for your help everyone!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|