Solved

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

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

In this article we want to have a look at the directory attributes which are used by Microsoft to store the so called Security Identifiers (SID). These SIDs plays an important role in delegating and granting permissions and in authentication of trus…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

770 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