By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,016 Members | 2,265 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,016 IT Pros & Developers. It's quick & easy.

Running File from HTML with Parameters

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
"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

P: n/a
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

P: n/a
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

P: n/a
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.