topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday March 29, 2024, 8:19 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Wireless network detector & IP settings changer  (Read 11872 times)

aka_bigred

  • Participant
  • Joined in 2008
  • *
  • Posts: 3
    • View Profile
    • Donate to Member
IDEA: Wireless network detector & IP settings changer
« on: January 04, 2008, 11:08 AM »
I have always wanted a little app that would automatically detect the wireless network you are connected to and change the IP settings accordingly. 

For example, when I'm at work, the SSID=WORK, and I need the wireless card set for DHCP.
When I'm at home, SSID=Home, change it to pre-defined static IP & DNS servers.

I had looked around some time ago, and there's a way to change the IPCONFIG settings via batch/command line, but my problem is detecting the connected SSID.  It shouldn't be too hard, just an array of SSID's and the associated IPCONFIG settings for each SSID.  When the SSID changes, check the profile listing for that SSID and implement those associated settings.
« Last Edit: January 04, 2008, 11:11 AM by aka_bigred »

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: Wireless network detector & IP settings changer
« Reply #1 on: January 04, 2008, 11:27 AM »
I think you're looking for netsetman :)

aka_bigred

  • Participant
  • Joined in 2008
  • *
  • Posts: 3
    • View Profile
    • Donate to Member
Re: IDEA: Wireless network detector & IP settings changer
« Reply #2 on: January 04, 2008, 01:27 PM »
Yeah, something along those lines, but want it to AUTOMATICALLY activate a profile when a specific wireless SSID is detected.  That app looks like you have to manually activate the profile.  Detecting the SSID tells what network I'm on so it should be able to activate a profile without my intervention.

I don't need all the extra bells & whistles that has, just basic IP settings per detected SSID.

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: Wireless network detector & IP settings changer
« Reply #3 on: January 04, 2008, 02:19 PM »
Oh, i thought that netsetman was able to do that :(

But i just made a quick search and found this on the ahk forum! :D

So, do you want me to make a script that will check the ssids, and when it changes to one on a predifined list, run the associated batch file?

aka_bigred

  • Participant
  • Joined in 2008
  • *
  • Posts: 3
    • View Profile
    • Donate to Member
Re: IDEA: Wireless network detector & IP settings changer
« Reply #4 on: January 09, 2008, 02:05 PM »
I saw that post, but looks like it's an on-demand script.  If it ran continuously and kicked off a batch script like you suggest, that'd be sweet!


Oh, i thought that netsetman was able to do that :(

But i just made a quick search and found this on the ahk forum! :D

So, do you want me to make a script that will check the ssids, and when it changes to one on a predifined list, run the associated batch file?

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: Wireless network detector & IP settings changer
« Reply #5 on: January 09, 2008, 04:28 PM »
Ok, done.

I attached a .zip to this post, with the .ahk source file and with a compiled version.

It checks every 5 seconds for changes in the SSID, and if so, it compares the current SSID against a pre-defined list of SSIDs specified in the .ini file, and if it detects the current one is one of them, it launches the associated action.

I think the .ini file is self-explanatory, but if you have some trouble, just post here ;)

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,066
    • View Profile
    • Donate to Member
Re: IDEA: Wireless network detector & IP settings changer
« Reply #6 on: January 10, 2008, 01:42 PM »
Can't you just set up connections to two different networks in the Connection Manager with the different settings then it will connect to whichever network is available?

magonicola

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: IDEA: Wireless network detector & IP settings changer
« Reply #7 on: March 31, 2009, 04:40 PM »
Ok, done.

I attached a .zip to this post, with the .ahk source file and with a compiled version.

It checks every 5 seconds for changes in the SSID, and if so, it compares the current SSID against a pre-defined list of SSIDs specified in the .ini file, and if it detects the current one is one of them, it launches the associated action.

I think the .ini file is self-explanatory, but if you have some trouble, just post here ;)

Hi,
first of all thanks for your attachment, very nice & usefull.
In particular this attachment has quite solved my problem: reconfiguring IP settings on SSID change. HOW? Your file lunch a BAT file made by netsh instruction that calls a txt files with appropriate config inside.

Now there's only a problem: sometimes your script gives me a run-time error (800a0046 code) of "cannot access to file" (privileges), the file is obviously SSID.txt, so I can't be "safe" to leave the pc alone and on being sure that it will change autometically the IP settings. (I don't know why this: your script works for minutes and only a few times at hour has got this error popup. Maybe, I think, 5 seconds of delay is not enough when CPU is stressed)
If you can fix this error you will solve not only my situation, but the problem of so many people.
THANKS!
« Last Edit: March 31, 2009, 05:02 PM by magonicola »

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: Wireless network detector & IP settings changer
« Reply #8 on: April 08, 2009, 05:27 PM »
Hi magonicola!
To be honnest, I don't quite know why that happens. Could you post a printscreen of the error?

potofcoffee

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: IDEA: Wireless network detector & IP settings changer
« Reply #9 on: May 28, 2009, 06:54 AM »
I think what you're really looking for is Net Profiles, recently open-sourced. Any help is appreciated.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: Wireless network detector & IP settings changer
« Reply #10 on: May 28, 2009, 07:00 AM »
Net Profiles, recently open-sourced
very cool  :Thmbsup: welcome to the site.