BgInfo display only IP address V4, no IP V6

Hi all,

Today i will give you hint how to display with BgIngo only IP address V4. This tool is very popular for help desk support and sysadmins. The issue is that out of box it will display also IP v6 address, this take more space, doesn’t look good and is not useful. The IP V4 only is much more cleaner and compact 😊.

 To achieve this I have used a vbs script to bring only IP V4 information

  •  Create a vbs script
  • Add a custom field in wstat.bgi. Keep this script in the BG folder when you deploy package this with SCCM

Download and Documentation for BgInfo 

VBS script

' Special BGInfo Script
' Only IPv4 Address v1.7
' Programmed by WindowsStar - Copyright (c) 2009-2011
' --------------------------------------------------------
strComputer = "."
On Error Resume Next
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSettings = objWMIService.ExecQuery ("SELECT * FROM Win32_NetworkAdapterConfiguration where IPEnabled = 'True'")
For Each objIP in colSettings
   For i=LBound(objIP.IPAddress) to UBound(objIP.IPAddress)
      If InStr(objIP.IPAddress(i),":") = 0 Then Echo objIP.IPAddress(i)

BGinfo before ip v6

BGinfo-config for IP V4

BGinfo-after IP v4 Only