Solved

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

Posted on 2007-03-23
1
969 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

747 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

14 Experts available now in Live!

Get 1:1 Help Now