View Full Version : Send Params to Exe from HTML
jbailey
August 21st, 2007, 12:08 PM
I have a program that emails a notice to my boss that he then clicks a link and it calls a program here in the office. The problem is I don't know the syntax for sending parameters in html.
The exe executes. All I need to know is the syntax for passing vars via an html link.
<a href="I:\Programs\Experiments\executeParameters.exe hi">send hi to executeParameters.exe</a>
THANKS!!
MTsoul
August 21st, 2007, 06:20 PM
You can't launch a program with parameters. However you can use a batch file.
<a href="I:\Programs\Experiments\executeParameters.bat">send hi to executeParameters.exe</a>
and executeParameters.bat would be
I:\Programs\Experiments\executeParameters.exe hi
jbailey
August 22nd, 2007, 10:52 AM
You can't launch a program with parameters. However you can use a batch file.
<a href="I:\Programs\Experiments\executeParameters.bat">send hi to executeParameters.exe</a>and executeParameters.bat would be
I:\Programs\Experiments\executeParameters.exe hi
Ok, that's a good method for achieving that. Thank you MTsoul
Do you know why a url link cannot send params? What is it calling in the OS environment to even pull up a file? Is it calling an API of some kind?
MTsoul
August 22nd, 2007, 12:13 PM
You can't send params because your link isn't executing it in the first place. It's to download it. If you click that link, it asks you to download or open. Opening is just a special way of downloading and executing. But you can't send params through that since it doesn't carry over. One is HTTP downloading and the other is executing from the system shell (Windows Explorer).
jbailey
August 22nd, 2007, 02:31 PM
You can't send params because your link isn't executing it in the first place. It's to download it. If you click that link, it asks you to download or open. Opening is just a special way of downloading and executing. But you can't send params through that since it doesn't carry over. One is HTTP downloading and the other is executing from the system shell (Windows Explorer).
When you say it's downloading, you're saying that even in an Outlook-like program a url link to a local program contained in an html email will download? It doesn't seem to be downloading. It seems to be executing the exe, since it is a local file.
I'm most likely wrong. Is there another way in HTML to cause a local program to execute and send parameters.
MTsoul
August 22nd, 2007, 04:24 PM
HTML isn't the same as Outlook. Outlook interprets HTML different than a browser. I don't have it so I can't say.
jbailey
August 23rd, 2007, 10:23 AM
HTML isn't the same as Outlook. Outlook interprets HTML different than a browser. I don't have it so I can't say.
Hmm ok. Well, thank you for the background info. Any ideas on how/where I should continue this research?
icio
August 24th, 2007, 04:06 AM
Can't you use the
<a href="file://c:\test.exe param">file protocol</a>
Not sure
Edit: Don't think that works, just opens in browser.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.