Google Answers Logo
View Question
 
Q: WMI,list of SSID's through .NET or vbs ( No Answer,   1 Comment )
Question  
Subject: WMI,list of SSID's through .NET or vbs
Category: Computers > Programming
Asked by: ramsubramanian-ga
List Price: $5.00
Posted: 05 Jun 2006 11:02 PDT
Expires: 05 Jul 2006 11:02 PDT
Question ID: 735472
I am trying to write a vb script or in .NET to grab all the available SSID's
and their signal strengths that the wireless card detects and dump it
into a file.


This is what i found on the net

' VBScript source code
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 wrote a similar program in C#. NET using the System.Management
namespace to no avail.

Except the first entry everything else returns garbage. I did some
research on the internet and found out that it was because of a bug in
SP2. I got the same result when i tried to write an application in C#
using the System.Management namespace. I need a fix for this quickly.

Kindly help and all thanks in advance.


I would ideally like to keep it to using WMI and lightweight.

Ram

Clarification of Question by ramsubramanian-ga on 05 Jun 2006 11:21 PDT
ideally it should work with 2000/XP SP1 and SP2 and with all wireless cards. 

Thanks
Answer  
There is no answer at this time.

Comments  
Subject: Re: WMI,list of SSID's through .NET or vbs
From: kaef-ga on 21 Jun 2006 03:37 PDT
 
Using VB.NET and WMI to Retrieve Available SSIDs 
http://blogs.wwwcoder.com/mmondok/archive/2005/06/23/5266.aspx

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy