VBScript Called by Batch File in Comm...

VBScript Called by Batch File in Command Task does not work

Posted in the Informatica Forum

Since: Jan 12

United States

#1 Jan 18, 2012
Hi Everyone,
I have a Windows batch file in a command task that calls a VBScript. It is working when I run the batch file manually, but when I run it through the command task, it doesnít work. It just keeps running and does not stop.

Hereís my batch file (cmdSendEmail.bat):

[CODE]
C:\PowerCenter_Scripts\sendmai lattachment.vbs
[/CODE]

And hereís my VBScript (sendmailattachment.vbs):
[CODE]
Dim objOutl
Set objOutl = CreateObject("Outlook.App lication")
Set objMailItem = objOutl.CreateItem(olMailItem)
'comment the next line if you do not want to see the outlook window
'objMailItem.Display
strEmailAddr = "[email protected] "
objMailItem.Recipients.Add strEmailAddr
objMailItem.Subject = "Test Email from PowerCenter"
objMailItem.Body = "Hi, this is only a test."
objMailItem.Attachments.Add "C:\PowerCenter_Output_Fi les\file.csv"
objMailItem.Send
Set objMailItem = nothing
Set objOutl = nothing
Wscript.Quit
[/CODE]

Hope you guys could help me. Iíve been clueless for days.

Regards,
r0mmel

Tell me when this thread is updated:

Subscribe Now Add to my Tracker

Add your comments below

Characters left: 4000

Please note by submitting this form you acknowledge that you have read the Terms of Service and the comment you are posting is in compliance with such terms. Be polite. Inappropriate posts may be removed by the moderator. Send us your feedback.

Informatica Discussions

Title Updated Last By Comments
Informatica Admin & Cloud Deployment May '17 avi_infa 1
Converting row data to column data (Sep '16) Sep '16 Roopa 1
How to Handle Horizontal tab in Flat file in in... (Sep '15) Jul '16 ann_p 2
active and passive t/f (Feb '16) Jul '16 ann_p 2
Loading a specific Erwin model version into Met... (Apr '16) Apr '16 SCHJA26 1
not recognizing the source file (Jun '08) Mar '16 Jayashree 2
calling informatica powercentre workflow as a s... (Mar '16) Mar '16 anil 1
More from around the web