Networking Forums

Networking Forums > Wireless Networking > Wireless Networks > Detect which SSID I'm connecting to with the command line

Reply
Thread Tools Display Modes

Detect which SSID I'm connecting to with the command line

 
 
nickj6282
Guest
Posts: n/a

 
      11-02-2006, 03:38 PM
Hi,

I take my notebook lots of different places, and some require a static IP
setup, while others have DHCP. I've finally learned the beauty of netsh.exe,
and I've created a few batch files to configure my IP differently in
different places. Does anyone know how to detect the SSID or MAC that my wifi
card has connected to from the command line so that I can create a batch to
run at Windows startup and configure the IP address appropriately?

Thanks,
-Nick
 
Reply With Quote
 
 
 
 
Jack \(MVP-Networking\).
Guest
Posts: n/a

 
      11-02-2006, 10:28 PM
Hi
It is not clear to me what you are using as an OS and Wireless mangar in
order to connect..
If you use WinXP with windows Zero Configuration, then once you are
connetced to an Open public HotSpot No futher configuarion is neccesary. If
you are not connetect then you can not get info about a Network that you can
not connect to. If a network needs static IP there is No way to detect
which IP to use (unless the network owner tells you) since you can not
connect to the Network in order to find the IP subnet.
This program can give info about available Hot Spot,
http://www.netstumbler.com
Jack (MVP-Networking).

"nickj6282" <(E-Mail Removed)> wrote in message
news:AF5B2A21-BA3F-4885-AA69-(E-Mail Removed)...
> Hi,
>
> I take my notebook lots of different places, and some require a static IP
> setup, while others have DHCP. I've finally learned the beauty of
> netsh.exe,
> and I've created a few batch files to configure my IP differently in
> different places. Does anyone know how to detect the SSID or MAC that my
> wifi
> card has connected to from the command line so that I can create a batch
> to
> run at Windows startup and configure the IP address appropriately?
>
> Thanks,
> -Nick



 
Reply With Quote
 
nickj6282
Guest
Posts: n/a

 
      11-03-2006, 03:36 AM
I don't think you understood. In the Wireless Zero Configuration, I have
several SSIDs preset to connect when in range (i.e. one at home, one at
school, etc.) What I want to do is when I start my laptop, run a batch that
will figure out which of the pre-defined SSIDs is in range, then assign the
pre-set IP address for that SSID (that I already have).

So like this basically:

if ssid = 'my home ssid' then set IP address to DHCP
if ssid = 'school' then set IP address to 172.30.1.138, default gateway...
etc.
if ssid = 'work' then set IP address to 10.100.128.251, default gateway...
etc.

....and so on. All in a batch file so it can run at Windows startup, or I can
just double click it and go.
 
Reply With Quote
 
Jack \(MVP-Networking\).
Guest
Posts: n/a

 
      11-03-2006, 03:53 PM
Hi

I do not think it can be done the way you define it.

However, you can use software like this,
http://www.globesoft.com/mnm8_home.asp

To predefine the setting of all your connections that you are using, and
choose the one that you want to connect to.

Jack (MVP-Networking).



"nickj6282" <(E-Mail Removed)> wrote in message
news:81F6561F-A6EE-4059-A834-(E-Mail Removed)...
>I don't think you understood. In the Wireless Zero Configuration, I have
> several SSIDs preset to connect when in range (i.e. one at home, one at
> school, etc.) What I want to do is when I start my laptop, run a batch
> that
> will figure out which of the pre-defined SSIDs is in range, then assign
> the
> pre-set IP address for that SSID (that I already have).
>
> So like this basically:
>
> if ssid = 'my home ssid' then set IP address to DHCP
> if ssid = 'school' then set IP address to 172.30.1.138, default gateway...
> etc.
> if ssid = 'work' then set IP address to 10.100.128.251, default gateway...
> etc.
>
> ...and so on. All in a batch file so it can run at Windows startup, or I
> can
> just double click it and go.



 
Reply With Quote
 
Pavel A.
Guest
Posts: n/a

 
      11-04-2006, 11:13 PM
"nickj6282" wrote:
> So like this basically:
>
> if ssid = 'my home ssid' then set IP address to DHCP
> if ssid = 'school' then set IP address to 172.30.1.138, default gateway...
> etc.
> if ssid = 'work' then set IP address to 10.100.128.251, default gateway...
> etc.


Hmm. maybe this can be done with WMI : MSNdis_80211_ServiceSetIdentifier
class (and you'll have to use vbscript instead of bat files) - however I
haven't tried this yet.

Regards,
--PA

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to add an ip to a NIC (from the command line)? gst Windows Networking 1 10-01-2008 02:42 PM
FXP command line client ? Pierre Bru Windows Networking 1 08-28-2006 04:46 PM
connecting to a particular wireless router by command line ? Ed Wireless Internet 6 09-16-2005 04:26 PM
mailing from the command line Andrew Schulman Linux Networking 1 01-27-2005 10:30 PM
command line Rupert Windows Networking 2 10-20-2003 07:23 PM



1 2 3 4 5 6 7 8 9 10 11