Solved

Trigger a bat file in a script, and wait until bat file is finished

Posted on 2007-03-23
1
976 Views
Last Modified: 2013-11-18
Hi
I have an script in a DTS package that executes a *.bat file (code enclosed at the bottom). When I execute the script and the bat file, I need the script to trigger the DTSTaskExecResult_Success After the bat file is finished running. How can I achieve this?
Code:

'**********************************************************************
'  Visual Basic ActiveX Script
'************************************************************************

Function Main()

Dim shell
set shell = createobject("wscript.shell")
shell.run "I:\applications\vps\Appl\HENTVPS.BAT"
      Main = DTSTaskExecResult_Success
End Function
0
Comment
Question by:alphasec
1 Comment
 
LVL 67

Accepted Solution

by:
sirbounty earned 500 total points
ID: 18778626
Try

shell.run "I:\applications\vps\Appl\HENTVPS.BAT",,True
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I met Paul Devereux (@pdevereux) today when I responded to his tweet asking “Anybody know how to automate adding files from disk to a folder in #outlook  ?”.  I replied back and told Paul that using automation, in this case scripting, to add files t…
Before we dive into the marketing strategies involved with creating an effective homepage, it’s crucial that EE members know what a homepage is. In essence, a homepage is the introductory, or default page, of a website that typically highlights the …
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now