469,270 Members | 1,056 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

Running File from HTML with Parameters

I have a unique requirement to run an executable file from withing a
HTML document. The HTML is actually embedded in an email sent as a
notification to a user of our application. I need to include a link in
the HTML which launches the application (exe) with command line
parameters.

The Application and users are all within our Intranet - the
application is accessible through a network dirve. I understand to
enable this to happen, a user must select to open file from current
location, and verify they wish to run it - both of which are fine.

I can launch the exe through the following:
<a href="file:\\ServName\Folder\AppName.exe">Launch App Screen XY</a>

However, the email notification will need to specify a start
screen/state, e.g:
<a href="file:\\ServName\Folder\AppName.exe%20X%20Y"> Launch App Screen
XY</a>

This results in a 'Cannot Find Server, Page Cannot be Displayed
Error'. If I cut the EXACT same Address and paste into a new browser,
then the application launches fine, with command line parameters
making it through to the application....So it seems there is nothing
wrong with the URL, but the fact that it is being called from a
hyperlink is causing some problem...

Any Thoughts?
Cheers,
Brad.
Jul 20 '05 #1
4 10736
"Brad Smith" <ch**********@yahoo.com.au> wrote in message
news:43*************************@posting.google.co m...
I can launch the exe through the following:
<a href="file:\\ServName\Folder\AppName.exe">Launch App Screen XY</a>

However, the email notification will need to specify a start
screen/state, e.g:
<a href="file:\\ServName\Folder\AppName.exe%20X%20Y"> Launch App Screen
XY</a>


Try running a batch file instead. When you call the batch file, it won't
require parameters and then the first line of the batch file can call your
application with parameters.

Jonathan
--
http://www.snook.ca/
Jul 20 '05 #2
Had thought of that but the parameters are not static, they are
different for each email notification.

A solution is to have a batch file generated along with the HTML which
has the dynamic parameters, however creating another file isn't the
best solution - I was hoping for something a little cleaner...

"Jonathan Snook" <go***************@snook.ca> wrote in message news:<08**********************@news01.bloor.is.net .cable.rogers.com>...
"Brad Smith" <ch**********@yahoo.com.au> wrote in message
news:43*************************@posting.google.co m...
I can launch the exe through the following:
<a href="file:\\ServName\Folder\AppName.exe">Launch App Screen XY</a>

However, the email notification will need to specify a start
screen/state, e.g:
<a href="file:\\ServName\Folder\AppName.exe%20X%20Y"> Launch App Screen
XY</a>


Try running a batch file instead. When you call the batch file, it won't
require parameters and then the first line of the batch file can call your
application with parameters.

Jonathan

Jul 20 '05 #3
ch**********@yahoo.com.au (Brad Smith) wrote in message news:<43*************************@posting.google.c om>...
I can launch the exe through the following:
<a href="file:\\ServName\Folder\AppName.exe">Launch App Screen XY</a>


That's invalid syntax; you're supposed to use forward slashes in URIs
regardless of the convention in the local operating system. Also, I
don't think it's proper to use LAN hosts after a double slash in a
"file" URI; the correct syntax, I believe, is to have five slashes
before the local host, the first three to indicate that it's in the
local network instead of out on the Internet, and the next two to
indicate a LAN host.
Jul 20 '05 #4
Either way result in the same problem - the parameters not being
passed to the application. IE 5.5 does recognise both formats as being
local.

da*@tobias.name (Daniel R. Tobias) wrote in message news:<aa**************************@posting.google. com>...
ch**********@yahoo.com.au (Brad Smith) wrote in message news:<43*************************@posting.google.c om>...
I can launch the exe through the following:
<a href="file:\\ServName\Folder\AppName.exe">Launch App Screen XY</a>


That's invalid syntax; you're supposed to use forward slashes in URIs
regardless of the convention in the local operating system. Also, I
don't think it's proper to use LAN hosts after a double slash in a
"file" URI; the correct syntax, I believe, is to have five slashes
before the local host, the first three to indicate that it's in the
local network instead of out on the Internet, and the next two to
indicate a LAN host.

Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Christopher Brandsdal | last post: by
11 posts views Thread by Steve Hoyer | last post: by
3 posts views Thread by Phil Stanton | last post: by
1 post views Thread by =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.