Windows – How to add command line arguments to command line arguments in Windows shortcut

command linecommand-line-argumentswindows

I know I can add a command line argument/option to a shortcut this way; for example:

"C:\Program Files\Internet Explorer\iexplore.exe" www.a.com

So IE will connect to a.com when it starts up. What I would like to do is to get IE connecting to a.com when I call it through another program like the following:

C:\Windows\SysWOW64\ForceBindIP.exe 192.168.1.151 "C:\Program Files\Internet Explorer\iexplore.exe" www.a.com

This does not work. IE starts up but doesn't go to a.com. It seems like the argument is either ignored or is understood as an argument of ForceBindIP instead (I'm not sure).


What I am trying to do is to create 2 IE shortcuts such each of them binds one IE window to one NIC and one particular website. So adding the www.a.com etc in its startup list won't help. OS is Windows 8.

Apologize if this has been asked and answered before. Please suggest keywords for searching if that's the case.

Best Answer

Create a batch file (called, say, foo.bat) that says

"C:\Program Files\Internet Explorer\iexplore.exe"  www.a.com

and then change the shortcut to say

C:\Windows\SysWOW64\ForceBindIP.exe  192.168.1.151  foo.bat

This lets you work within ForceBindIP’s apparent restriction of handling only

ForceBindIP.exe  IP address full path to app

on its command line (without accepting any parameters for the app), while also providing parameter(s) for Internet Explorer.  (You’ll note that their web page shows only the above usage, although they don’t spell out the restriction.)