How do I pass arguments/parameters to a batch script in an Outlook rule ? The Parameters would be located in the body of the message.
Thanks.
- Edited by BluestoneBeach Tuesday, November 04, 2014 2:24 PM Poorly worded description
Technology Tips and News
How do I pass arguments/parameters to a batch script in an Outlook rule ? The Parameters would be located in the body of the message.
Thanks.
Hi,
If the two arguments are always next to each other, then we can simply add that single phrase to the specific words list.
If the two arguments are not always next to each other, then there is no way in Outlook to do this with a single rule but we can achieve this by creating 2 rules. See:
http://www.msoutlook.info/question/220
Regards,
Steve Fan
TechNet Community Support
Thank you Mr. Fan for your reply. I realized that my question was not worded correctly. I re-wrote the entire question. Basically, I want to know how to pass parameters/arguments to a batch script. The parameters would be located in the body of the message.
Thank you.
Well there is no possible way to pass an argument to a batch file using the Rules GUI in Outlook so I had to resort to VBA coding to handle this task. This link got me 85% of what I needed.
How to process incoming messages
@Bluestone, Could you share your vb script that got you to run a bat file and pass arguments? I am very novice at vb script writing but need to do the following:
send myself a specific email and run the contents of whatever i place in the body of the email.
eg:
subject: restart server
body:
shutdown \\server1 /r
or
c:\mystuff\restartapp.bat app1 bill force 10