Quantcast
Channel: Sysinternals Forums
Viewing all articles
Browse latest Browse all 10386

BgInfo : BGInfo & Windows 8 & Hyper-V

$
0
0
Author: WindowsStar
Subject: BGInfo & Windows 8 & Hyper-V
Posted: 09 January 2013 at 12:07am

We have been begging for a new version for years now. So far nothing.
 
Let me know. -WS
 
Try this for the IP address:
 
 
' Special BGInfo Script
' Network Enabled Address IP4 v2.3
' Programmed by WindowsStar - Free to Use (c) 2009-2013
' --------------------------------------------------------
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery ("Select * From Win32_NetworkAdapter WHERE NetConnectionStatus=2")
For Each objItem in colItems
   If objItem.MACAddress <> NUL Then strMACAddress = strMACAddress & objItem.MACAddress & "#"
Next
strMACAddresses = Split(strMACAddress,"#")
Set colNetCard = objWMIService.ExecQuery ("Select * From Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
For I = 0 to UBound(strMACAddresses)
   For Each objNetCard in colNetCard
      If objNetCard.MACAddress = strMACAddresses(I) Then
         For Each strIPAddress in objNetCard.IPAddress
            If InStr(strIPAddress,".") Then
               If InStr(arrIPAddress,strIPAddress) = 0 Then Echo strIPAddress
               arrIPAddress = strIPAddress & " "
            End If
         Next
      End If
   Next
Next
 

Viewing all articles
Browse latest Browse all 10386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>