Hi.
The attached VBScript displays all available WiFi networks.
It works fine on WinXP, but doesn't work on Win7.
On WinXP it shows a list of all available WiFi networks, however on WIn7 it shows an empty list.
What is the problem?
on error resume next
set objSWbemServices = GetObject("winmgmts:\\.\root\wmi")
set colInstances = objSwbemServices.ExecQuery("SELECT * FROM MSNDis_80211_BSSIList")
for each obj in colInstances
if left(obj.InstanceName, 4) <> "WAN " and right(obj.InstanceName, 8) <> "Miniport" then
for each rawssid in obj.Ndis80211BSSIList
ssid = ""
for i=0 to ubound(rawssid.Ndis80211SSid)
decval = rawssid.Ndis80211Ssid(i)
if (decval > 31 AND decval < 127) then
ssid = ssid & Chr(decval)
end if
next
wscript.echo ssid
next
end if
next
I am a newbie with VBScript so please be gentle.