Duplicate wifi connection but with different gateway

Page 3 of 3 FirstFirst 123

  1. Posts : 524
    Windows 7 Home Premium x64
       #21

    Have you considered IP Switching software like this? Free IP Switcher - Free software downloads and software reviews - CNET Download.com

    It's similar to the Toshiba "ConfigFree" application. I use it on a work laptop that must be connected to various networks and stand alone machines. It's a bit slow but much easier than manually editing the various parameters.
      My Computer


  2. Posts : 640
    Windows 7 Ultimate x64
       #22

    Why you want to do it, I don't care but hopefully this batch file will help. Just copy to notepad save as anything you like with the extension .bat.

    Make sure the Interface, IP, subnet and gateways match what you need. The interface name should be whats displayed in "Network Connections - Change adaptor settings" or you could run "netsh interface show interface" from a cmd prompt.

    Remove pause from the end once it's working, pause is just there so you can read any errors given.

    ---- Start batch ----

    @echo off
    set INTERFACE="Wireless Network Connection"
    set IP=192.168.0.2
    set SUBNET=255.255.255.0

    :START
    echo Choose Gateway
    echo.
    echo 1. 192.168.0.1
    echo 2. 192.168.0.10
    echo.

    set /p GW=Choice?

    if %GW%==1 goto GW1
    if %GW%==2 goto GW2

    cls
    echo Invalid choice '%GW%'. Enter 1 or 2.
    echo.
    goto START

    :GW1
    set GW=192.168.0.1
    netsh interface ip set address name=%INTERFACE% static %IP% %SUBNET% %GW%
    goto END

    :GW2
    set GW=192.168.0.10
    netsh interface ip set address name=%INTERFACE% static %IP% %SUBNET% %GW%

    :END
    pause
    ---- End batch ----

    If you prefer 2 batch files instead of the choice use the first 4 lines followed by the netsh line with the appropriate gateway.

    This presumes your using IPv4 with a static IP, if not let us know and I should be able to modify for IPv6, not sure about DHCP but I could have a look. If your disabled DHCP service you will also need to re-enable it to use this script.
    Last edited by Duzzy; 17 Oct 2011 at 04:27. Reason: Bold changes needed. Added last paragraph.
      My Computer


  3. Posts : 4
    Windows 7 Ultimate 32bit
       #23

    have you tried using your firewall to stop/enable your windows apps from using the internet?
    just make sure vmware or the virtuilizing app always has internet access
      My Computer


 
Page 3 of 3 FirstFirst 123

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 11:09.
Find Us