file:/// arguments

  • Thread starter Thread starter Jeff T.
  • Start date Start date
J

Jeff T.

All,

In IE6, it's easy to do something like this on the URL: file:///C:/myDir/myApp.exe

and the browser will launch it kinda like a DOS prompt would.

Question is, how can I supply arguments to myApp ?

Thanks.
-Jeff
 
Doug,

Thanks for the reply, but this doesn't work, unless I'm missing
something. I put that in the IE6 browser URL bar and it attempts to
search on it. Tried it with and without the quotes. Any
clarification? Thanks.

-Jeff
 
Sounds like it can't find it. Test it just using Notepad:

file://c:/windows/notepad.exe

This should work. If not, there's some config setting off.

Does your URL actually have 3 slashes? It should be file:// and not
file:///.
 
Actually, both two and three slashes work, at least for me. For
example,

file://c:/windows/notepad.exe
file:///c:/windows/notepad.exe

both launched notepad. Similarly,

file://c:/windows/system32/cmd.exe

works as expected. But try any of the following, with 2- or 3-
slashes on each:

file://c:/windows/system32/cmd.exe /c notepad.exe
"file:///c:/windows/system32/cmd.exe /c notepad.exe"
(file:///c:/windows/system32/cmd.exe /c notepad.exe)
file://c:/windows/system32/cmd.exe%20/c%20notepad.exe

and none works. The %20 is supposed to be the hex for space. Just to
make sure, try typing in

cmd /c notepad.exe

on the Command Prompt and you'll see it works fine.

Any reason why IE6 can launch anything, but can't seem to accept
arguments?

-Jeff
 
Actually, both two and three slashes work, at least for me.

There is a reason for the third slash: you can put a dns name or ip
address from your local network between the second and third slashes in
order to access its files. "localhost" (your own pc) is the default, so
<file:///c|/winnt/notepad.exe> and
<file://localhost/c|/winnt/notepad.exe> should both work. I was taught
to use "|" instead of ":" for msdos/windows drive letter designators.

....none of which helps you pass parameters, sorry. For CGI programs,
you pass them separated by question marks at the end of http:// urls.
That won't work with file:// urls.
<http://groups.google.com/[email protected]>

Maybe you could ask for advice in
news:comp.infosystems.www.authoring.cgi or some group in that
neighborhood.
 
I've got no clue on what you're talking about. The statement "Sounds like
it can't find it" meant that the OS cannot file the file being requested.
The original question was how to pass args on the browser window URL line.
You do it via "http://www.mydomain.com/program.exe arg1 arg2 arg3". The
Notepad test I gave was to see if the he could even launch a Notepad session
via the browser, before even getting to the command arguments.

Other than that, I'm not sure what you're suggesting to this guy to try.
 
Back
Top