VBS命令-获取电脑本机MAC地址
操作方法
- 01
Dim str str = GetMAC() MessageBox str EndScript Function GetMAC() GetMAC = "" Dim mc,mo Set mc = GetObject("Winmgmts:").InstancesOf("Win32_NetworkAdapterConfiguration") For Each mo In mc If mo.IPEnabled = True Then 'TracePrint "本机网卡MAC地址是: " & mo.MacAddress GetMAC = mo.MacAddress Exit For End If Next Set mc = nothing End Function
赞 (0)