Question : VBScript WLAN MAC Address

I require a VBScript that will display the MAC address of the onboard WLAN card of a laptop.
Fairly urgent, 500 points.

Answer : VBScript WLAN MAC Address

Hi, churchlandsshs.

You can use something like this but you'll have to know the adapter's name, manufacturer, or something that uniquely identifies the adapter you're looking for.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
On Error Resume Next

Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20

arrComputers = Array("Computer1","Computer2")

For Each strComputer In arrComputers
   WScript.Echo
   WScript.Echo "=========================================="
   WScript.Echo "Computer: " & strComputer
   WScript.Echo "=========================================="

   Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
   Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapter", "WQL", _
                                          wbemFlagReturnImmediately + wbemFlagForwardOnly)

   For Each objItem In colItems
      WScript.Echo "Caption: " & objItem.Caption
      WScript.Echo "MACAddress: " & objItem.MACAddress
      WScript.Echo "Manufacturer: " & objItem.Manufacturer
      WScript.Echo "Name: " & objItem.Name
      WScript.Echo
   Next
Next
Random Solutions  
 
programming4us programming4us