Solved

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

Posted on 2007-03-23
1
986 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 500 total points
ID: 18778626
Try

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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
Introduction During my participation as a VBScript contributor at Experts Exchange, one of the most common questions I come across is this: "I have a script that runs against only one computer. How can I make it run against a list of computers in …
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Suggested Courses

710 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