Here's a simple, and I
mean simple, connection failover done in AutoIt.
I've called it.......
iFallover Single file executable, put it wherever you like. When you run it the first time, two files will be extracted - devcon.exe and EULA.TXT - if you've run it previously, there will also be iFallover.ini.
What it does:
Every preset interval, (set in config), it tries to connect to one of the given web addresses, the next interval, the next address and so on - just cycling through the given three addresses. After three consecutive connection attempts have failed it will disable that particular network connection and enable the other - then the process starts again.
So it could keep toggling between the two connections if they both happen to be SNAFU.
It uses devcon.exe to disable/enable the interfaces. Devcon.exe causes a processor spike when it disables/enables things, so don't be surprised when the CPU shoots up to 30% if the connection needs to be swapped - it's only for a second or two.
The tray icon has three states:
0 = No network connection, you will only see this if the program starts and there is no internet connection at all.
1 = Currently using primary network connection.
2 = Currently using secondary network connection.
You can manually switch between the connections using the tray icon menu, (but it will switch them back after three failures if there is no internet connection).
The first time the program starts and there is no settings file it will open the config dialog where you can select your two network interfaces, the web addresses to use for testing and the interval between connection attempts.
NOTE: There is no input checking of either the Interval or the web addresses. If you put a number in the web address or put letters for the Interval the program won't care. There is
very basic input checking: No empty fields and the two connections can't be the same. Minimum interval is 15 seconds. Consider yourself warned!
ANOTHER NOTE: This has only been tested on Windows 7 HP x64 and only by swapping a network cable between two NICs. I've got no idea if it will work for wireless, (as in GSM/3G), but it should be fine switching between Ethernet and WiFi, (as in a laptop).
FINAL NOTE: Both the program and I assume the connections you want to switch between are already set up and
work and that a simple enabling of them will establish a connection -
that is all. I won't be doing anything that requires setting connection parameters, dialling numbers, moving satellite dishes to new co-ordinates, etc - you're on your own in that case.