Hi there,
i wanted to parse a parameter into vbscript file.
i wrote a batch file and will be scheduled to run at specific time.
when it runs, it will parse a parameter into another file, written in vbscript.
What is the command to include the parameters to parse into vbs file.
As example: start "" cmd /c cscript SMTP.vbs
note:
SMTP.vbs is the vbscript file which is going to receive and use the parameter.
if the parameter is 1, then SMTP will send message A to people in group A.
if the parameter is 2, then SMTP will send message B to people in group B.
if the parameter is 3, then SMTP will send message C to people in group C.
SMTP.vbs will have the scripts to send appear as such:
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "This is a test subject. Please ignore."
objMessage.From = "AAAaaa@gmail.com"
objMessage.To = "BBBbbb@gmail.com"
objMessage.TextBody = "This is some sample message body."
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "111.222.333.444"
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
objMessage.Send
i wanted to parse a parameter into vbscript file.
i wrote a batch file and will be scheduled to run at specific time.
when it runs, it will parse a parameter into another file, written in vbscript.
What is the command to include the parameters to parse into vbs file.
As example: start "" cmd /c cscript SMTP.vbs
note:
SMTP.vbs is the vbscript file which is going to receive and use the parameter.
if the parameter is 1, then SMTP will send message A to people in group A.
if the parameter is 2, then SMTP will send message B to people in group B.
if the parameter is 3, then SMTP will send message C to people in group C.
SMTP.vbs will have the scripts to send appear as such:
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "This is a test subject. Please ignore."
objMessage.From = "AAAaaa@gmail.com"
objMessage.To = "BBBbbb@gmail.com"
objMessage.TextBody = "This is some sample message body."
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "111.222.333.444"
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
objMessage.Send