BGinfo "Network Card" internal string name; what is it?

Bob Hurd 21 Reputation points

I an trying to display BGinfo's Network Card name without some extraneous information that is on the end of the Network Card description that BGinfo displays. The problem is that I don't know what the string name BGinfo uses for "Network Card". I know how to remove the added information at the end of a field using vbs, but I need to know what that field name is called.

This should be a simple question to answer, but I cannot locate that information anywhere.

Thank you.


Advanced system utilities to manage, troubleshoot, and diagnose Windows and Linux systems and applications.
1,105 questions
0 comments No comments
{count} votes

Accepted answer
  1. Michael Taylor 49,251 Reputation points

    OK so you're using WMI to retrieve this information via VBScript. Here's the auto-generated VBS code from WMI Code Creator that appears to get the display name of the adapter that should match what BGInfo is pulling, based upon my simple testing.

    Set adapters = objWMI.ExecQuery("SELECT * FROM Win32_NetworkAdapter",,48) 
    For Each objItem in adapters
        Wscript.Echo "-----------------------------------"
        Wscript.Echo "Win32_NetworkAdapter instance"
        Wscript.Echo "-----------------------------------"
        Wscript.Echo "Name: " & objItem.Name

    FYI, VBS is an old tech that isn't very performant and has been deprecated. I might recommend that you consider switching to Powershell which is supported on all versions of Windows, is faster and easier and has a lot more functionality. You can run PS scripts just like VBS scripts and it is effectively the replacement for the command prompt. Just something to consider.

2 additional answers

Sort by: Most helpful
  1. Michael Taylor 49,251 Reputation points

    You didn't mention how you're getting this information outside of BGInfo (Powershell, C#, etc). On the 2016 Servers I manage it appears to be using the Device Description or DIsplay Name. I tested on Win 10 and it is using Display Name to distinguish between multiple adapters with the same driver (e.g. Hyper-V or vmWare adapters). So I would say it is using DIsplay Name. How you get that information programmatically is determined by what client you're using though.

    0 comments No comments

  2. Bob Hurd 21 Reputation points

    I am using vbs to extract the information from BGinfo. For clarity's sake, I am displaying the information on the desktop with other BGinfo "standard" information. For instance, I used the following code to extract whether we are under Standard Time or Daylight savings time and stored it in the variable "TZ".

    Set Win32Computer = objWMI.ExecQuery("SELECT * FROM Win32_ComputerSystem")

    For Each Item In Win32Computer
    DaySave = Item.DaylightInEffect

    Set Items = objWMI.ExecQuery("SELECT * FROM Win32_TimeZone")

    For Each TimeItem In Items
    DayDST = TimeItem.DaylightName
    DaySTD = TimeItem.StandardName

    If DaySave <> "True" then
    TZ = DaySTD
    TZ = DayDST
    End If

    Echo TZ

    0 comments No comments