A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Run an executable with arguments from an HTML mail message



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old November 3rd 09, 09:41 PM posted to microsoft.public.outlook.program_vba
Dan Mitchell
external usenet poster
 
Posts: 58
Default Run an executable with arguments from an HTML mail message

nbrege wrote in
:
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

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook: save HTML message into a single HTML file? Mr. Burns Outlook - General Queries 1 June 1st 09 01:43 PM
Unable to create HTML mail message(Unicode) using MAPI in Outlook UTEK Outlook - Using Forms 1 January 2nd 09 07:46 PM
Pasting HTMl into mail message - Background no longer displays? [email protected] Outlook - General Queries 1 November 23rd 06 03:43 PM


All times are GMT +1. The time now is 03:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.