$sky=mac()

Func mac()
$wbemFlagReturnImmediately = 0x10
$wbemFlagForwardOnly = 0x20
$colItems = ""
$strComputer = "localhost"
$Output=""
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled != 0", "WQL", _
                                          $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
If IsObj($colItems) then
   For $objItem In $colItems
      $Output1 = $Output & "" & $objItem.MACAddress & @CRLF
   Next
Return $Output1
Else
Endif
EndFunc

MsgBox(0,"","你的mac地址:   "&$sky)

創作者介紹

Felix's Second Life 電腦數碼世界

Felix 發表在 痞客邦 PIXNET 留言(0) 人氣()