![]() |
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I want one of my applications to send an HTML email message to a user with a
hyper link in it to start up an executable with arguments passed to it. It works fine if I just specify the executable path with no arguments. But if I pass the arguments then Outlook says it can't find the file. Here is the line that I add to the email message body to start the exe only: "<a href="""C:\program files\someFolder\myApp.exe""">Click here</a> to run program." but if I add the arguments it doesn't work: "<a href="""C:\program files\someFolder\myApp.exe cust=1234 order=5678""">Click here</a> to run program." Has anyone done this before or know what I need to do to make it work with arguments? Thanks...
|
|
#2
|
|||
|
|||
|
I am very ignorant when it comes to HTML, but I think I see where your
problem is. Here's some coding, which includes an ampersand to join two strings, and therefor probably isn't proper in an HTML context, but the following might give you an idea that you could code properly in HTML: "<a href="""C:\program files\someFolder\myApp.exe""" & """cust=1234 order=5678""">Click here</a> to run program." Sorry if I wasted your time. MarceepooNu -- MarceepooNu "nbrege" wrote: > I want one of my applications to send an HTML email message to a user with a > hyper link in it to start up an executable with arguments passed to it. It > works fine if I just specify the executable path with no arguments. But if I > pass the arguments then Outlook says it can't find the file. > > Here is the line that I add to the email message body to start the exe only: > > "<a href="""C:\program files\someFolder\myApp.exe""">Click here</a> to run > program." > > but if I add the arguments it doesn't work: > > "<a href="""C:\program files\someFolder\myApp.exe cust=1234 > order=5678""">Click here</a> to run program." > > Has anyone done this before or know what I need to do to make it work with > arguments? Thanks... > |
|
#3
|
|||
|
|||
|
I'm very ignorant when it comes to HTML, but I think I see the vbscript
problem. If I'm right, it has to do with the spaces in the path. I think HTML doesn't use the amperand (&) to join two strings; so the following code probably won't work; but I bet you'll know how to correct my error. So, here's my [wrong] code: "<a href="""C:\program files\someFolder\myApp.exe""" & """cust=1234 order=5678""">Click here</a> to run program." I apologize if this wasn't helpful, and instead a waste of your time. -- MarceepooNu "nbrege" wrote: > I want one of my applications to send an HTML email message to a user with a > hyper link in it to start up an executable with arguments passed to it. It > works fine if I just specify the executable path with no arguments. But if I > pass the arguments then Outlook says it can't find the file. > > Here is the line that I add to the email message body to start the exe only: > > "<a href="""C:\program files\someFolder\myApp.exe""">Click here</a> to run > program." > > but if I add the arguments it doesn't work: > > "<a href="""C:\program files\someFolder\myApp.exe cust=1234 > order=5678""">Click here</a> to run program." > > Has anyone done this before or know what I need to do to make it work with > arguments? Thanks... > |
|
#4
|
|||
|
|||
|
nbrege <nbrege@discussions.microsoft.com> wrote in
news:C14FB3AD-923E-4D68-B4A7-634BC94C47AC@microsoft.com: > I want one of my applications to send an HTML email message to a user > with a hyper link in it to start up an executable with arguments > passed to it. It works fine if I just specify the executable path > with no arguments. But if I pass the arguments then Outlook says it > can't find the file. There's no way to do this, URLs can't contain command-line arguments. Outlook doesn't matter here, it's just not possible. Here's some alternative approaches, assuming you control the server that it's being downloaded from, and the code that's being run: 1. Request is "dostuff.exe?order=1234"; the server 302 redirects to "dostuff_order_1234.exe", and dostuff.exe checks its own filename and pulls command-line arguments out of there 2. Server drops a cookie with "order=1234" when it gets the request; dostuff.exe reads cookies back out when it starts (this is probably impossible on newer versions of Firefox, they changed the cookie code so this is much more difficult than it used to be) 3. append bytes with the arguments to the executable, executable reads its own binary at launch time. Works fine, but breaks code signing. 4. server downloads a zip file with a batch file in there, user runs the batch file, batch file contains "dostuff order=1234" 5. define new file extension, '.dostuff'; user downloads a .dostuff file containing "order=1234", associate .dostuff with your executable. -- dan |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| can't send message w/html attachments | Caruso | Outlook General | 0 | 10-05-2009 07:09 PM |
| Executable but not downloadable file | KSnow | Miscellaneous | 1 | 07-28-2009 10:33 AM |
| No message and never received a message are sent in HTML, always in plain text | Paul Falardeau | Outlook General | 3 | 06-05-2009 09:40 AM |
| Outlook: save HTML message into a single HTML file? | Mr. Burns | New Users | 1 | 06-01-2009 09:43 AM |
| rules and HTML in message body | Mickey Ferguson | Outlook General | 3 | 04-16-2009 03:47 PM |