One-click switch between network settings for different locations (Windows)

Wizard Update: One click switch network settings for windows 7

Mobile computers are everywhere now. Many people need to connect to networks (wired or wireless) in more than one place – at home and at work. One of the annoyances of current Windows interface is that you cannot easily store connection profiles – the way you can in MacOS X (called “Locations”) for quite a long time.

There is a workaround for that, involving a simple preliminary network setup + creation of a shortcut. I will briefly describe it here in 3 steps (you will have to repeat for each connection profile you would like to create). Here is how it goes:

[preparation]
Open a command prompt
(click STARTRun… then type cmd and click OK),
type md %windir%\netsettings (or copy it from here and paste it in the command prompt with a right-click) and hit Enter. Don’t close the command prompt yet.

  1. Make all network settings for the current profile (e.g. Office) – go to Network Connections, select the appropriate connection (wired and/or wireless) and set IP-address, network mask, default gateway, DNS servers, etc.
  2. Execute in the command prompt the following command
    netsh -c interface dump > %windir%\netsettings\office.txt
    and hit Enter.
  3. Create a shortcut on your desktop by minimizing all open windows, right-clicking on an empty place on the desktop and selecting New -> Shortcut…
    In the new window that opens, type (or better paste) the following
    netsh -f %windir%\netsettings\office.txt
    and click Next…
    Type a name for the profile (for instance Office settings) and click Finish.

Repeat steps 1-3 for as many profiles you need to create, changing office.txt with home.txt (etc.) in steps 2 and 3. Give each profile shortcut a distinguishable name.

You can now switch between different network profiles by simply clicking the appropriate icon on the desktop!

Note that this approach creates a full network profile (including settings for all network interfaces – wired and wireless), so in rare situations you might need to create different combinations of settings. It is also useful to have a setting with all connections set to auto, in case you need to access networks in hotels, airports and other public places.

Tags: , , , , , , , , ,

3 Responses to “One-click switch between network settings for different locations (Windows)”

  1. Michel says:

    Thanks for the tip — I have just tested it and it works really well (WinXP), plus it’s quite easy to make (and later activate) as many profiles as needed!

  2. [vladi] says:

    Well, that’s the point 😉

    I also tried it in Vista, it requires that the command prompt is run with administrative privileges.

    I had a glitch though, it does not completely change the config, it rather adds it all up – several IP addresses “compiled” together (?!).

    Will investigate it a little further and update. Meanwhile, I (and probably others) will greatly appreciate if someone could check if it works fine in Vista/2008/windows 7 and report.

  3. Mark H. says:

    Works great with proxy settings on Windows 7 (I have admin rights). Thanks!