How To Force A Program To The Use Of Network (LAN Or WiFi)

LAN and WiFi together

 

This is a real treat.   You, with windows,

Use Multiple Network Adapters Simultaneously.

It is not my bag of flour but cmq having searched for a solution to my problem, I’m happy to share the discovery and especially having it applied in different forms.

My requirement was to:

  • Exploit The Connectivity Provided By An Internet Key (Any) Or

  • Exploit The Connectivity Provided By ‘Duck Antenna WiFi Laptop Or External SIMULTANEOUSLY LAN Main

remaining in practice with the PC attached via LAN (cable) to another network (corporate, private, etc.).

Basically I had to work with terminals remotely on the corporate LAN …. but every now and then shoot away FTP file on some of my sites (something denied by the corporate proxy) and surf all the sites I wanted to avoid any restrictions company … and without losing communication with the LAN nor having to unplug the cable.

You say: Embee? Embee a horn!

Windows Unfortunately Does Not Allow You To Take Advantage Of Multiple Networks Simultaneously

(Normally gives priority to the LAN) and especially as I know you can not decide to use Outlook and business applications via LAN and simultaneously open up a Firefox or eMule on a WiFi network found by chance or open with an internet key …

With this procedure instead be able to do different spells (with linux things that maybe are on the agenda … but not with Winzozz) …

THE BENEFITS ARE HUGE …

  • You Can Choose To Take Advantage Of Multiple Networks (LAN, WiFi Or Via Keys) Or Rather Multiple Network Cards, Forcing Individual Applications To Use Only (And Temporarily) Only That Network / Network Card;

  • Having Access To More WiFi Networks You Could Install More Antennas On Your PC And Several Programs To Download Movies, Music And Software Via Peer-To-Peer … Each Directed To A Specific Network, So They Do Not Occupy The Bandwidth Of The Main Network … And Multiplying In Fact The Scope Of The Gang … Brilliant !!;

  • Surfing The Internet Even If Physically Connected To A Corporate LAN Full Of Restrictions;

  • You Will Not Need To Install Any Program In A ‘Fixed': Be Running It Only When Needed And Only For The Individual Application …

Here’s how to do if you have a windows system (tested on XP, Vista and Seven 32 and 64 bit) !!

  • Please download this zip:   http://old.r1ch.net/stuff/forcebindip/download/ForceBindIP-1.2a.zip
  • Inside you will find two files: a .exe and .dll
  • Copy these two files in your folder ‘ system32 ‘(example: C: \ Windows \ System32)

Now the program is already installed !!! Before continuing, we have to choose which programs to ‘force’ and know the network cards to be addressed.

To understand how to do, I illustrate an example scenario.

Let us assume that we have our laptop stuck with the LAN cable to our corporate network and coupled to a proxy that restricts access to the internet and want to use a session Firefox to use a WiFi network outside.

  • First we disable the proxy in Internet Explorer (Tools -> Options -> Connections -> LAN settings): so we could continue to use the corporate network (programs, mail, etc.).
  • Engage a WiFi key or activate the laptop’s WiFi and agganciamoci to a free network (or one for which we know the password.)

Now we have two possibilities to force the program (in this case, Firefox) on the new network: or indicating the IP or – this being dynamic – we can point to the serial network interface.

Solution 1: If we want to use ‘on the fly’ the IP that our PC has the WiFi card

  • we open a terminal with ‘Start’ – ‘cmd';
  • type ‘ipconfig’ and identify the IPv4 associated with the adapter WiFI. In my example I have two cards, the first shown below is the WiFi and the second is the LAN. Then the IPv4 will ‘192.168.1.22’

 

  • Now, we must seek the full path where you installed the program to run, in our example Firefox. We can click the right button on the icon that is on the desktop Firefox, then on ‘properties’ and consider the contents of the box ‘Destination’.

 

  • always from the command prompt can type the command:

ForceBindIP <IP ASSIGNED BY NETWORK CARD> <PATH COMPLETE PROGRAM EXECUTABLE>

and that is therefore in our case:

ForceBindIP 192.168.1.22 “C: \ Program Files (x86) \ Mozilla Firefox \ firefox.exe”

Result: magically opens a session of Firefox that will only use the network as allocated … and then in the example the WiFi …

Solution 2: If we want to use more durable forcing the network card

Because the IP with which we force the program is dynamic, you can point the address windows associated with the card instead of the IP that assigns us, as this is static with respect to IP.

To do that, we have to try this ‘label’ in the system log.

  • We open the registry by running ‘regedit’ from a command prompt or from the menu ‘start’ -> ‘run’ or ‘Start’ -> and typing ‘regedit’ in the empty box of research;
  • Navigate to the following location: ” HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Tcpip \ Parameters \ Interfaces “and look for the network card on which you want to force a particular program. In my case I found the label {2D59219D-4B71-4170-9E2F-0AB0195F3FF8} associated to my WiFi key, with dynamic IP 192.168.1.22.

 

  •  Now, we must seek the full path where you installed the program to run, in our example Firefox. We can click the right button on the icon that is on the desktop Firefox, then on ‘properties’ and consider the contents of the box ‘Destination’.

 

 

  • always from the command prompt can type the command:

ForceBindIP <LABEL ASSIGNED TO NETWORK CARD> <PATH COMPLETE PROGRAM EXECUTABLE>

and that is so in my case:

ForceBindIP {2D59219D-4B71-4170-9E2F-0AB0195F3FF8} “C: \ Program Files (x86) \ Mozilla Firefox \ firefox.exe”

 

Creating a simple batch script

We can now create us some links on the desktop to open your favorite programs directly if necessary.

For example, I created 3 links for 3 different programs: firefox, chrome and FTP Filezilla.

It ‘very easy:

  • We create a new text document on the desktop, rename it .bat (for example: ‘ForceBind_Firefox.bat’)
  • Editiamolo and insert inside the command string to execute, for example:

 

ForceBindIP {2D59219D-4B71-4170-9E2F-0AB0195F3FF8} “C: \ Program Files (x86) \ FileZilla FTP Client \ filezilla.exe”

 

result:

 

 

Now that you know how to force a single program using a particular network adapter, WiFi dongle or internet key … do not have to do anything but fun !!

Obviously not all programs work: for example, I had problems with MSN live messenger (in the end I managed to get it started ..) but no problem with eMule, uTorrent, firefox, chrome and many others ..

In case of problems, try to run the program with the -i option.

Example:

ForceBindIP -i {2D59219D-4B71-4170-9E2F-0AB0195F3FF8} “C: \ Program Files (x86) \ Windows Live \ Messenger \ msnmsgr.exe”

For more info you can take a look at the website of the manufacturer of the little program:  http://www.r1ch.net/stuff/forcebindip/

Add Comment