Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2007-03-23
1
Medium Priority
?
988 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 67

Accepted Solution

by:
sirbounty earned 2000 total points
ID: 18778626
Try

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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
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…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

688 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