Function GetMACAddress2() As String ' Getmac win32
Dim mc As ManagementClass = New ManagementClass("Win32_NetworkAdapterConfiguration")
Dim moc As ManagementObjectCollection = mc.GetInstances()
Dim MACAddress As String = String.Empty
For Each mo As ManagementObject In moc
If CBool(mo("IPEnabled")) Then MACAddress &= mo("MacAddress").ToString() & ";"
mo.Dispose()
Next
Return MACAddress.Trim.Trim(";").Trim
End Function