Home All Groups Group Topic Archive Search About

Script Wireless Zero Config on XP?

Author
23 Apr 2009 5:59 PM
skillzero
Is it possible to script Wireless Zero Config on Windows XP SP3? It
looks like the netsh commands for wlan are missing on XP (but there on
Vista). We'd like to be able to set profiles, get RSSI, etc. for
testing different configurations in an automated way. Is this possible
on XP? If so, where should I look? WMI? Visual Basic? .bat scripts?

Author
23 Apr 2009 6:24 PM
Pavel A.
skillzero wrote:
> Is it possible to script Wireless Zero Config on Windows XP SP3? It
> looks like the netsh commands for wlan are missing on XP (but there on
> Vista). We'd like to be able to set profiles, get RSSI, etc. for
> testing different configurations in an automated way. Is this possible
> on XP? If so, where should I look? WMI? Visual Basic? .bat scripts?

WMI can give the RSSI and some other parameters.
To set profiles... only Visual basic is your friend
from the above list - or even better, Visual C.
Of course, unless you have Centrino: PROSet has some WMI
scriptable interface, if memory serves.

regards,
-- pa
Author
23 Apr 2009 10:17 PM
skillzero
On Apr 23, 11:24 am, "Pavel A." <pave***@NOfastmailNO.fm> wrote:

> WMI can give the RSSI and some other parameters.
> To set profiles... only Visual basic is your friend
> from the above list - or even better, Visual C.
> Of course, unless you have Centrino: PROSet has some WMI
> scriptable interface, if memory serves.

Thanks, it sounds like using the Wlan APIs from Visual C is the best
option? If so, I can write a command line tool in C so normal .bat
scripts can invoke it.

BTW...If I wanted to use WMI, can you give an example of how I might
get the RSSI? I've heard of WMI, but never used it so I'm not even
sure how I would invoke it.
Author
24 Apr 2009 9:38 PM
Pavel A.
Show quote Hide quote
"skillzero" <skillz***@gmail.com> wrote in message
news:139ab6de-5ca7-4060-b43e-92a99f7dfde1@d2g2000pra.googlegroups.com...
> On Apr 23, 11:24 am, "Pavel A." <pave***@NOfastmailNO.fm> wrote:
>
>> WMI can give the RSSI and some other parameters.
>> To set profiles... only Visual basic is your friend
>> from the above list - or even better, Visual C.
>> Of course, unless you have Centrino: PROSet has some WMI
>> scriptable interface, if memory serves.
>
> Thanks, it sounds like using the Wlan APIs from Visual C is the best
> option? If so, I can write a command line tool in C so normal .bat
> scripts can invoke it.
>
> BTW...If I wanted to use WMI, can you give an example of how I might
> get the RSSI? I've heard of WMI, but never used it so I'm not even
> sure how I would invoke it.


The following vbscript demonstrates use of
MSNdis_80211_ReceivedSignalStrength
WMI class. It  should work on WinXP.

======
Set wmi = GetObject("winmgmts:{impersonationLevel=impersonate}!root/wmi")
On Error Resume Next
Set AdapterSet = wmi.ExecQuery("select * from
MSNdis_80211_ReceivedSignalStrength")

  If Err.Number <> 0 Then
    Wscript.Echo "Error from WMI:" & Err.Number
    Wscript.Quit 2
  End If

  For each wa in AdapterSet
          WScript.Echo "Adapter name=", wa.InstanceName
          WScript.Echo "RSSI=", wa.Ndis80211ReceivedSignalStrength
  Next
=========

Regards,
-- pa
Author
25 Apr 2009 1:23 AM
skillzero
On Apr 24, 2:38 pm, "Pavel A." <pave***@12fastmail34.fm> wrote:

> The following vbscript demonstrates use of
> MSNdis_80211_ReceivedSignalStrength
> WMI class. It  should work on WinXP.
>
> [...]

Thanks!
Author
29 Apr 2009 11:37 PM
skillzero
Show quote Hide quote
On Apr 24, 2:38 pm, "Pavel A." <pave***@12fastmail34.fm> wrote:
> "skillzero" <skillz***@gmail.com> wrote in message

> The following vbscript demonstrates use of
> MSNdis_80211_ReceivedSignalStrength
> WMI class. It  should work on WinXP.
>
> ======
> Set wmi = GetObject("winmgmts:{impersonationLevel=impersonate}!root/wmi")
> On Error Resume Next
> Set AdapterSet = wmi.ExecQuery("select * from
> MSNdis_80211_ReceivedSignalStrength")
>
>   If Err.Number <> 0 Then
>     Wscript.Echo "Error from WMI:" & Err.Number
>     Wscript.Quit 2
>   End If
>
>   For each wa in AdapterSet
>           WScript.Echo "Adapter name=", wa.InstanceName
>           WScript.Echo "RSSI=", wa.Ndis80211ReceivedSignalStrength
>   Next
> =========

Sorry if this is a dumb question, but do you know how I could do the
equivalent of the above script using the "wmic" command line tool? I
recently found this and I can us it it to dump some basic info about
the system (e.g. OS version), but I'm not sure how to get 802.11 info
from it. I tried MSNdis_80211_ReceivedSignalStrength and a few
variants, but it always says "alias not found". Thanks.