Forum Moderators: open

Message Too Old, No Replies

Linking to exe's and passing arguments

link argument passing

         

jmkakabarb

10:27 pm on Dec 8, 2003 (gmt 0)

10+ Year Member



Hi,

I am new to web developing so apologise in advance if this question if trivial.

I would like to link an executable in an html doc I use as my homepage (the page is a file local to my workstation.

For example the link could look like this.

<a href="file:///T:/jason/putty53b.exe">coras004</a>

That parts easy, my next problem is to make this link more useful I would like to pass some arguments with the call to the exe, like the following example.

<a href="file:///T:/jason/putty53b.exe -load coras004">coras004</a>

Although this seems logical to me, my browser disagrees and complains that it can not find the file. I have confirmed the file and argument work when issued from the command line, I have tried surrounding he string in various quotes/chars and have searched around the web a fair bit. I have seen lots of references to linking to exe's but none regarding passing arguments.

My feeling is that the browser parses the string correctly but does not understand the significance of treating the string as a whole.

My second problem is how I should handle this file (using mime) I suspect I need to handle this as a application/octet-stream mime type, but convention dictates I should offer to save the file, not open it by default.
I agree with this as I do not want to open every exe file I click on the wild web, but how do I achieve a balance. I amgine I have to do one or the other as mime-types are handled by the browser so out of my control (ie. I can not dictate the default behaviour or check to see if the .exe is prefixed with a local drive label.

I thought I would probably have to script a solution but being new to this kind of thing I suppose I am looking for advice on this too, what language? etc (I would like to support Firebird, Mozilla and IE)

Any advice greatly appreciated.

Krapulator

10:58 pm on Dec 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try this

<a href="file:///T¦/jason/putty53b.exe%20-load%20coras004">coras004</a>

jmkakabarb

10:59 pm on Dec 8, 2003 (gmt 0)

10+ Year Member



Thanks for the suggestion, I meant to add in my first email that I had already tried that.

Thanks though.