lafta All American 14880 Posts user info edit post |
so im trying to read available AP ssid's and signal strength using wmi but i cant get the code to work, has anyone ever done this?
here's my code, what did i do wrong?
--------------------------------------------------------------------------
Dim apobj, hold, ap, sett, apset
set objSwbemServices = GetObject("winmgmts:\\.\root\wmi")
set apobj = objswbemServices.ExecQuery("Select * From MSNDis_80211_BSSIList")
for each ap in apobj sett = ap.Ndis80211BSSIList next
for each apset in sett wscript.echo "SSID: " & apset.Ndis80211ssid wscript.echo "Mac: " & apset.Ndis80211MacAddress wscript.echo "RSSI: " & apset.Ndis80211Rssi wscript.echo "RSSI: " & apset.Ndis80211wlanbssidlength next 11/2/2008 9:36:59 PM |
evan All American 27701 Posts user info edit post |
Set objWMI = GetObject("winmgmts://./root\WMI") Set objBSSIDS = objWMI.InstancesOf("MSNdis_80211_BSSIList",48)
On Error Resume Next For Each objBSSID in objBSSIDS For Each objBSSI in objBSSID.Ndis80211BSSIList wscript.echo "SSID: " & objBSSI.Ndis80211ssid wscript.echo "Mac: " & objBSSI.Ndis80211MacAddress wscript.echo "RSSI: " & objBSSI.Ndis80211Rssi wscript.echo "RSSI: " & objBSSI.Ndis80211wlanbssidlength Next Next On Error Goto 0 11/3/2008 12:21:11 AM |
lafta All American 14880 Posts user info edit post |
thats awsome, thanks, except only the rssi and ssidLength work, the rest dont print out
any ideas? 11/3/2008 2:04:45 AM |
evan All American 27701 Posts user info edit post |
no clue, i didn't even know that class existed in the WMI namespace, nor can i find anything on msdn about it
try something like
For Each objBSSID in objBSSIDS Join(objBSSID.Ndis80211BSSIList, ", ") Next
to output the whole array 11/3/2008 9:59:58 AM |