Advertisement
Combreal

getWifiMacAddr.vbs

Jul 7th, 2020
1,877
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. dim WMI:  set WMI = GetObject("winmgmts:\\.\root\cimv2")
  2. dim Nads: set Nads = WMI.ExecQuery("Select * from Win32_NetworkAdapter where physicaladapter=true")
  3. dim nad
  4. Dim wifiMacAddr
  5. for each Nad in Nads  
  6.     if not isnull(Nad.MACAddress) and not InStr(Nad.description, "Intel") = 0 then wifiMacAddr = Nad.MACAddress  
  7. next
  8. Wscript.Echo wifiMacAddr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement