Hello, Try this:
#include <Constants.au3>
MsgBox(0,"The mac Adress is",_GetMAC())
;Return Value:
;OK : The Mac Adress
;Wrong : Return ""
Func _GetMAC()
local $Result, $mac,$line
$mac = Run(@ComSpec & " /c " & 'GETMAC /FO table',@SystemDir, @SW_HIDE,$STDERR_CHILD + $STDOUT_CHILD)
While 1
$line &= StdoutRead($mac)
If @error Then ExitLoop
Wend
$line = StringSplit($line,@CRLF,1)
if @error then Return ""
$Result = StringSplit($line[4]," ",1)
if @error then Return ""
Return $Result[1]
EndFunc
P.S.: Sorry my English.