Page 1 of 1

Running VBScript from tm1

Posted: Tue Mar 18, 2014 10:45 am
by late.vaibhav
Hi

I want know the correct method to pass the parameter to vbScript,Currently i am using following code to send parameter to .vbs file which is created to sent mail.
arguments = 'CScript D:\Mail\SendMailOther.vbs '|sSMTPSvr |' ' | sSender | ' "'|pRecipient|'" "'|pSubject|'" "'| pBody | '"' ;
EXECUTECOMMAND(arguments ,1);


When i rum the vbs file after hard-coding the parameters it works but when i try to send the parameters from TI it doesn't give any error message but my mail is not get triggered.

I am using following code in my Vb Script:
SMTPServer = WScript.Arguments(0)
Mail_from = WScript.Arguments(1)

Thanks & Regards
Vaibhav Late.

Re: Running VBScript from tm1

Posted: Wed Mar 19, 2014 11:20 am
by babytiger
TI wouldn't give out any error message, since the command executed is a correct syntax vbs command.

I would suggest test out the command from a command line, run cmd, and enter >D:\Mail\SendMailOther.vbs with parameters between double-quotes. If there's anything wrong with the vbs, you will get an error.