Topic Options
#31483 - 08/05/09 04:53 PM run script task
Nikki Offline
OL Newbie

Registered: 05/13/02
Posts: 17
I have a run script task that uses VBScript to call a .bat file. It appears as though once the script is called the run script task is considered complete and moves to the next task. Is there something I can do to get the next task to wait until the .bat script has completed?

Top
#31484 - 08/05/09 04:55 PM Re: run script task
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4953
Loc: Objectif Lune Montreal
Nikki,

Does your VBScript does anything else, or does it just calls the .bat? If it just calls the .bat, then perhaps a "Run External Program" action would be more appropriate. Watch will run a script, but if that script calls another external ressource, Watch will not know about it and won't wait for it to finish. So a Run External Program might work better to call your .bat file.

Regards,
Rapha

Top
#31485 - 08/05/09 05:00 PM Re: run script task
Anonymous
Unregistered


The Shell run command has a wait on return property. I would suggest trying that.

Something like this

Return = WshShell.Run("notepad " & WScript.ScriptFullName, 1, true)

The last parameter is the wait.

Top
#31486 - 08/06/09 05:25 PM Re: run script task
Nikki Offline
OL Newbie

Registered: 05/13/02
Posts: 17
Thanks for the replies. It just calls the .bat script. I moved it to the Run External Program and it works beautiful now. Thanks

Top