Moin,
ich würde gerne meine 2 Ethernet-Adapter Lan-Verbindung Mac-Adresse anzeigen, mit einer klappt es, doch ich habe nichts gefunden wie ich die 2te anzeigen lasse.
Wenn ihr etwas wisst lasst es mich.
Hier der Teil des Skriptes:
Spoiler anzeigen
#include <File.au3>
#include <Process.au3>
FileDelete("C:\logs\Panelcheckliste.txt") ;Delete the Logfile "test"
DirCreate("C:\logs\") ;create a log´s folder
Local $Log = FileOpen("C:\logs\Test.txt", 1) ;log localization
$strComputer = "."
$objWMIService = ObjGet("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & $strComputer & "\root\cimv2")
$colAdapters = $objWMIService.ExecQuery _
("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = False") ;Search the Mac Address
$str = ''
For $objAdapter in $colAdapters
$str &= " Physical (MAC) address: " & $objAdapter.MACAddress & @LF
Next
MacAddress ()
Func MacAddress () ;Start Func to show the Mac Address
FileWrite ($Log, "Physical address: "&$objAdapter.MACAddress& ""&@CRLF) ;Write the Varible of the Mac Address in Log
EndFunc ;End of the Func
Local $iRc = _RunDos("start Notepad C:\logs\Test.txt")
MfG
Hingo