Results 1 to 5 of 5

Thread: Detect Connection Device Name [RESOLVED]

  1. #1

    Thread Starter
    New Member Zheldon's Avatar
    Join Date
    May 2005
    Posts
    4

    Resolved 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.

  2. #2

    Thread Starter
    New Member Zheldon's Avatar
    Join Date
    May 2005
    Posts
    4

    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

  3. #3
    Member
    Join Date
    Mar 2005
    Posts
    43

    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

  4. #4
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    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:
    1. On Error Resume Next
    2.  
    3. Const wbemFlagReturnImmediately = &h10
    4. Const wbemFlagForwardOnly = &h20
    5.  
    6. arrComputers = Array("MYPCNAME")
    7. For Each strComputer In arrComputers
    8.    WScript.Echo
    9.    WScript.Echo "=========================================="
    10.    WScript.Echo "Computer: " & strComputer
    11.    WScript.Echo "=========================================="
    12.  
    13.    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\WMI")
    14.    Set colItems = objWMIService.ExecQuery("SELECT * FROM MSNdis_TransmitsOk", "WQL", _
    15.                                           wbemFlagReturnImmediately + wbemFlagForwardOnly)
    16.  
    17.    For Each objItem In colItems
    18.       WScript.Echo "Active: " & objItem.Active
    19.       WScript.Echo "InstanceName: " & objItem.InstanceName
    20.       WScript.Echo "NdisTransmitsOk: " & objItem.NdisTransmitsOk
    21.       WScript.Echo
    22.    Next
    23. Next

  5. #5

    Thread Starter
    New Member Zheldon's Avatar
    Join Date
    May 2005
    Posts
    4

    Resolved [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
  •  



Click Here to Expand Forum to Full Width