daywalkereg 0 Report post Posted July 30, 2007 A. Percy made a nice script that gives me (my network adapter + my MAC Address + My IP Address + and gateway IP) but it gives me results in table i want it in msgbox can any 1 help me to do that for me please :"> 1 £0\\/3 |-|3® $0 |\\/|µ(|-| Share this post Link to post Share on other sites
smashly 11 Report post Posted July 31, 2007 (edited) Hi Had a go at your question.. It's not pretty , but it displays in a msgbox ... lol $AdapterList = GetAdaptersList() MsgBox(64,'Network Adapters List', $AdapterList) Exit Func GetAdaptersList( $ListAll = 0 ) Local $aString, $SR, $Adapters If @OSTYPE = "WIN32_NT" Then ;Use WMI Local $o_WMIService = ObjGet( "winmgmts:\\" & @ComputerName & "\root\cimv2" ) Local $Query = "SELECT Index, Caption, MACAddress, IPAddress, DefaultIPGateway FROM " & _ "Win32_NetworkAdapterConfiguration" If $ListAll = 0 Then $Query &= " Where IPEnabled = True" EndIf Local $o_Adapters = $o_WMIService.ExecQuery( $Query, "WQL", 0x30 ) If IsObj( $o_Adapters ) Then Local $o_Adapter For $o_Adapter In $o_Adapters $Adapters += 1 $aString &= "Index: " & $o_Adapter.Index & @CRLF & _ "Adapter Name: " & $o_Adapter.Caption & @CRLF & _ "Real Mac Address: " & $o_Adapter.MACAddress & @CRLF & _ "IP Address: " & $o_Adapter.IPAddress(0) & @CRLF & _ "Default Gateway: " & $o_Adapter.DefaultIPGateway(0) & @CRLF & @CRLF Next $SR = StringReplace($aString, "Index: ", "Total Network Adapters Detected: " & _ $Adapters & @CRLF & @CRLF & "Index: ", 1) EndIf EndIf return $SR EndFunc Good luck "N" Cheers Edited July 31, 2007 by smashly Share this post Link to post Share on other sites
daywalkereg 0 Report post Posted July 31, 2007 Thanx 1 £0\\/3 |-|3® $0 |\\/|µ(|-| Share this post Link to post Share on other sites