Display SSID on the command line

S

spacemancw

Running XP SP2
also have CYGWIN_NT-5.1 installed
I need a way to display the SSID of the wireless network to which I'm
connected using the command line, DOS or Cygwin.

ipconfig /all gives some info but nothing about the wireless network.

I know on Vista I can use netsh on the command line as follows

netsh wlan show networks mode=bssid

however there is no 'wlan' option with netsh on XP.
I can't use a gui for this, I have to capture the SSID as text.
Clicking on my wireless network connection it shows the SSID, so that
info is there somewhere and must be able to be pulled out using some
command line utility.

Any ideas? ...... Or ..... where can I get the version of netsh
that's on Vista?

thanx
 
S

spacemancw

For anyone interested and looking for a similar solution I have the
best workaround I could figure out. Well I have 2 workarounds.
The reason I want the SSID is to find out if the PC is connected to my
network or a neighbour's. If connected to a neighbour's network then
break the connection. This is because my kids are always trying ways
to beat security on my network. But you could do this in other
situations.

1.) Schedule a script on the PC to run ipconfig and extract the
gateway.
Ping the gateway
do arp -a
compare the result of arp -a to the already known MAC address of your
router.
If they don't match do ipconfig /release.
Run this every minute or as you like.


2.) On the router config there should be a field for domain. Put your
SSID in that field.
On the PC in the ipconfig /all output there is a DNS suffix line where
that domain will be displayed.
With a similar script to the one above, extract that domain, if it is
not the one expected, disconnect.
Of course your SSID could be linksys and everyone in the neighbourhood
could be using linksys also.
The MAC address one is more specific cos every MAC address is unique.
But if using the SSID, set yourself an SSID which is unique as
possible.
The entry in the domain field on the router config doesn't even have
to be the SSID, it can be any identifiable one word (with dots if you
like but no spaces)
such as myrouter or myrouter.whatever.

Good luck
 
S

Sooner Al [MVP]

spacemancw said:
For anyone interested and looking for a similar solution I have the
best workaround I could figure out. Well I have 2 workarounds.
The reason I want the SSID is to find out if the PC is connected to my
network or a neighbour's. If connected to a neighbour's network then
break the connection. This is because my kids are always trying ways
to beat security on my network. But you could do this in other
situations.

1.) Schedule a script on the PC to run ipconfig and extract the
gateway.
Ping the gateway
do arp -a
compare the result of arp -a to the already known MAC address of your
router.
If they don't match do ipconfig /release.
Run this every minute or as you like.


2.) On the router config there should be a field for domain. Put your
SSID in that field.
On the PC in the ipconfig /all output there is a DNS suffix line where
that domain will be displayed.
With a similar script to the one above, extract that domain, if it is
not the one expected, disconnect.
Of course your SSID could be linksys and everyone in the neighbourhood
could be using linksys also.
The MAC address one is more specific cos every MAC address is unique.
But if using the SSID, set yourself an SSID which is unique as
possible.
The entry in the domain field on the router config doesn't even have
to be the SSID, it can be any identifiable one word (with dots if you
like but no spaces)
such as myrouter or myrouter.whatever.

You might be better off using the free Windows SteadyState (for XP) product
or other type of parental control software (built-in to Vista by the way) to
lock down your computer(s) so you have control on what your kids can do and
when they can do it. Some ISPs provide free parental control software...

http://www.microsoft.com/windows/products/winfamily/sharedaccess/default.mspx

Otherwise names like NetNanny,Cyberpatrol, Cybersitter,
etc...etc...etc...etc come to mind.

http://www.netnanny.com
http://www.cybersitter.com
http://www.webfilteringsoftware.com

Make sure the kids are using a limited account (standard user if running
Vista) and that *ALL* of the user accounts on you computer(s) are password
protected with a strong password...

http://www.microsoft.com/protect/yourself/password/checker.mspx

As an FYI here are some threads from the BBR discussion forums on a similar
subject, ie. blocking access to other networks from your computer(s)...

http://www.dslreports.com/forum/remark,16615118

--

Al Jarvi (MS-MVP Windows Networking)

Please post *ALL* questions and replies to the news group for the
mutual benefit of all of us...
The MS-MVP Program - http://mvp.support.microsoft.com
This posting is provided "AS IS" with no warranties, and confers no
rights...
How to ask a question
http://support.microsoft.com/KB/555375
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top