HREF for executable file with parameter

M

Martin Wulfe

I am writing an application that generates HTML as the body of an
email. In it, I want to include a link to an executable, but I need
to run the executable with a parameter, as you would from the command
line:

c:\>MyApp.exe parm1

The problem is I cannot figure out how to include the parameter in the
HREF. When I try

<A HREF="C:\MyApp.exe parm1">

or

<A HREF="C:\MyApp.exe%20parm1>

I get an error. Any help out there?

TIA,
Martin
 
A

Adrienne Boswell

I am writing an application that generates HTML as the body of an
email. In it, I want to include a link to an executable, but I need
to run the executable with a parameter, as you would from the command
line:

c:\>MyApp.exe parm1

The problem is I cannot figure out how to include the parameter in the
HREF. When I try

<A HREF="C:\MyApp.exe parm1">

or

<A HREF="C:\MyApp.exe%20parm1>

I get an error. Any help out there?

TIA,
Martin

It's really a security issue - imagine c:\delete *.*
 
A

Adrian

Martin Wulfe said:
I am writing an application that generates HTML as the body of an
email. In it, I want to include a link to an executable, but I need
to run the executable with a parameter, as you would from the command
line:

c:\>MyApp.exe parm1

The problem is I cannot figure out how to include the parameter in the
HREF. When I try

<A HREF="C:\MyApp.exe parm1">

or

<A HREF="C:\MyApp.exe%20parm1>

I get an error. Any help out there?

TIA,
Martin
*********************************************
What this sounds to me like is, that you want to create an

application that handles emails, and that in the email you

want to embed the activation of a program. That sounds

malwarish to me, or have I misunderstood your intensions?

Adrian.
 
A

Adrian

Adrienne Boswell said:
It's really a security issue - imagine c:\delete *.*

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
********************************************
Looking at your beautiful work, this came up:

XML Parsing Error: junk after document element
Location: http://www.visionforglendale.com/
Line Number 166, Column 1:<script type="text/javascript"
src="http://analytics.hosting24.com/count.php"></script>
^
Adrian
 
A

Adrienne Boswell

********************************************
Looking at your beautiful work, this came up:

XML Parsing Error: junk after document element
Location: http://www.visionforglendale.com/
Line Number 166, Column 1:<script type="text/javascript"
src="http://analytics.hosting24.com/count.php"></script>
^
Adrian

Thank you, Adrian. I always forget to turn that stupid thing off!
I'll have to do it tomorrow, though, the servers are down for
maintenance.
 
M

Martin Wulfe

*********************************************
What this sounds to me like is, that you want to create an

application that handles emails, and that in the email you

want to embed the activation of a program. That sounds

malwarish to me, or have I misunderstood your intensions?

Adrian.
No, it's not malware. It's an internal application that will be used
by only about 10-15 people, to keep track of development of an
internal software package. The parameter attacheed to the end of the
exe name will be the record ID in a database that will be opened when
the recipient clicks on the link.
 
A

Adrian

Martin Wulfe said:
No, it's not malware. It's an internal application that will be used
by only about 10-15 people, to keep track of development of an
internal software package. The parameter attacheed to the end of the
exe name will be the record ID in a database that will be opened when
the recipient clicks on the link.
*********************************************
Can't you have a loop in which the status of a shared file
is perpetually checked, which the user elswhere in the
network can modify? (There could be a file each.)
The changed status could activate whatever you want
on, or from the central box.

Adrian
 
M

Martin Wulfe

*********************************************
Can't you have a loop in which the status of a shared file
is perpetually checked, which the user elswhere in the
network can modify? (There could be a file each.)
The changed status could activate whatever you want
on, or from the central box.

Adrian
Actually, the solution I'm thinking of is similar to that. The
application (which can sit in any of 10 - 15 desktops) will write a
script file named, for example domyapp123.vbs, which will sit on the
LAN, and will start the app with 123 as its argument. The email the
app sends would have an HREF pointing to that file. Not very
elligent, but it should work. The approach of adding an argument in
the HTML is a whole lot cleaner, ifI can get it to work.

Martin
 
A

Adrian

Martin Wulfe said:
Actually, the solution I'm thinking of is similar to that. The
application (which can sit in any of 10 - 15 desktops) will write a
script file named, for example domyapp123.vbs, which will sit on the
LAN, and will start the app with 123 as its argument. The email the
app sends would have an HREF pointing to that file. Not very
elligent, but it should work. The approach of adding an argument in
the HTML is a whole lot cleaner, ifI can get it to work.

Martin
*********************************************
Elegance can give a deveoper nightmares :)
As long as it works bug free why worry, because
by the looks of it, it is a temporary job anyway.

Adrian
 
M

Martin Wulfe

*********************************************
Elegance can give a deveoper nightmares :)
As long as it works bug free why worry, because
by the looks of it, it is a temporary job anyway.

Adrian
No, its not temporary. This is a software package that evolves over
time and is used each year during an anual nationwide survey. And I
disagree with your comment about elegance: to me, its what makes
programming interesting.
 
A

Adrian

Martin Wulfe said:
No, its not temporary. This is a software package that evolves over
time and is used each year during an anual nationwide survey. And I
disagree with your comment about elegance: to me, its what makes
programming interesting.
********************************************
"Its what makes programming interesting."
I might want to agree,

Adrian,
 
M

Martin Wulfe

********************************************
"Its what makes programming interesting."
I might want to agree,

Adrian,
So I'm back to my original question: how can I construct an HTML
anchor to an executable file with a command-line argument?
 
M

Martin Wulfe

*********************************************
Can't you have a loop in which the status of a shared file
is perpetually checked, which the user elswhere in the
network can modify? (There could be a file each.)
The changed status could activate whatever you want
on, or from the central box.

Adrian
So i'm back to my original question: is there some way to construct
an HTML anchor to an executable with a parameter...
<A HREF="file:///myapp.exe param1"/A>? I have the alternative I
described working, but it is going to start generating one file for
every record in the database, and that is going to over 500 very soon.
That is truly ineligant!
 
A

Adrian

Martin Wulfe said:
So i'm back to my original question: is there some way to construct
an HTML anchor to an executable with a parameter...
<A HREF="file:///myapp.exe param1"/A>? I have the alternative I
described working, but it is going to start generating one file for
every record in the database, and that is going to over 500 very soon.
That is truly ineligant!
*********************************************
That obviously is ineffective and I don't understand. If only
some user information needs to be conveyed, then there
need only be one shared file per user, i.e. 10 -15.
The code below shows what I mean
Userone wants to bingo
Usertwo wants to bongo
Try it it. Works fine on an XP.
This is MS DOS Batch File

rem beginning
:Again
if exist C:\Share\Userone.txt goto Executeone
if exist C:\Share\Usertwo.txt goto Executetwo
rem Wait for 10 seconds
ping -n 10 127.0.0.2 > nul
goto Again
:Executeone
del C:\Share\Userone.txt
c:\test\bingo.exe
:Executetwo
del C:\Share\Usertwo.txt
c:\test\bongo.exe
:Again

rem end
 
A

Adrian

Adrian said:
*********************************************
That obviously is ineffective and I don't understand. If only
some user information needs to be conveyed, then there
need only be one shared file per user, i.e. 10 -15.
The code below shows what I mean
Userone wants to bingo
Usertwo wants to bongo
Try it it. Works fine on an XP.
This is MS DOS Batch File

rem beginning
:Again
if exist C:\Share\Userone.txt goto Executeone
if exist C:\Share\Usertwo.txt goto Executetwo
rem Wait for 10 seconds
ping -n 10 127.0.0.2 > nul
goto Again
:Executeone
del C:\Share\Userone.txt
c:\test\bingo.exe
:Executetwo
del C:\Share\Usertwo.txt
c:\test\bongo.exe
:Again

rem end
**********************************
PS it is a bat file of course.
 
M

Martin Wulfe

Is myapp.exe something you created? If so, you could register it as the
handler for a custom URL scheme, then use that scheme in your links
instead of http. For example:

<a href="myscheme:param1">

sherm--
Sherm -

Please read the earlier posts about this. Yes, this is a VB 2005 app
I am writing. One part of it sends emails to selected internal
recipients with an HTML body. I want this message to include a link
back to this app (but on the recipient's computer) that includes a
parameter with the record ID of the database it should open.

What you're suggesting may work, but to tell the truth, I don't have
the experience with .Net yet to know if it will. Can you suggest
where in MSDN I might find more about this?

Thanks,
Martin
 
T

Tim Greer

Martin said:
I am writing an application that generates HTML as the body of an
email. In it, I want to include a link to an executable, but I need
to run the executable with a parameter, as you would from the command
line:

c:\>MyApp.exe parm1

The problem is I cannot figure out how to include the parameter in the
HREF. When I try

<A HREF="C:\MyApp.exe parm1">

or

<A HREF="C:\MyApp.exe%20parm1>

I get an error. Any help out there?

TIA,
Martin

On the web via a browser, it would more likely be a path of <a
href=/scriptnamehere.exe> and you'd pass an argument, such as <a
href=/webpath/to/script.exe?field=value> or just script.exe?value
(depending on how it accepts the arguments).
 
T

Tim Greer

Martin said:
I am writing an application that generates HTML as the body of an
email. In it, I want to include a link to an executable, but I need
to run the executable with a parameter, as you would from the command
line:

c:\>MyApp.exe parm1

The problem is I cannot figure out how to include the parameter in the
HREF. When I try

<A HREF="C:\MyApp.exe parm1">

or

<A HREF="C:\MyApp.exe%20parm1>

I get an error. Any help out there?

TIA,
Martin

Pardon my last response. I assumed you were wanting the anchor for a web
document on a web server, I see you're trying to use it locally on the
system outside of a web service in your followup posts.
 
T

Tim Greer

Tim said:
On the web via a browser, it would more likely be a path of <a
href=/scriptnamehere.exe> and you'd pass an argument, such as <a
href=/webpath/to/script.exe?field=value> or just script.exe?value
(depending on how it accepts the arguments).

Pardon my last response. I assumed you were wanting the anchor for a web
document on a web server, I see you're trying to use it locally on the
system outside of a web service in your followup posts.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top