BGInfo in Vista and Longhorn

Did you try to use Sysinternals (now Microsoft) BGInfo on Windows Vista or Windows Server Codenamed “Longhorn”? Do you also prefer to see your network-settings such as IP-Adress and DNS-Server on the Background-Screen of BGInfo?

So did you like the picture you’ve got? Here’s an example:

BGInfo in Vista/Longhorn Default

So apparently we are getting nine IP-Addresses and nine DNS-Servers back, but only one is configured. However, we only want the one Address which is configured, not any virtual or whatever Network-Interface. We still can use BGInfo, but we need to put some more brain into it.

BGInfo also allows you to configure Scripts or custom variables, and return their value. So in BGInfo, follow these steps:

  1. In BGInfo, underneath the list box “Fields” where you are able to select which values to see, click “Custom”
  2. In the dialog box “User Defined Fields”, click “New”
  3. In the dialog box “Define New Field”, choose an “Identifyer”, such as “MyIPAdress”
  4. Under “Replace identifyer with” click “WMI Query”
  5. In the text box “Path”, enter the following WMI Query:
    SELECT IPAddress FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = TRUE
  6. Close the dialog box with OK and repeat from Step 2 to create another new field:

Identifier:
    MyDNSServer
Path (WMI Query):
    SELECT DNSServerSearchOrder FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = TRUE

After you added MyIPAdress and MyDNSServer to your background, it’ll look like the following:

BGInfo - Fixed now with WMI



2 Responses to “BGInfo in Vista and Longhorn”

  1.   James Pogran Says:

    That would be because in Vista, changes to WMI allow you to iterate in the array in VBscript much easier. This would affect anything written in the old way. Check out Scriptcenter for articles on new Vbscript and WMI methods in Vista.

    Reply

  2.   John S Says:

    Can you provide other WMI variable for the components in BGInfo (such as Subnet Mask) or provide a resource to find them? For Example: this is what I am using for Subnet, which is failing:

    SELECT SubnetMask FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = TRUE

    Reply

Leave a Reply