Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you make VBS wait until a process/application is done? 1

Status
Not open for further replies.

emo

Programmer
Jul 20, 2000
2
DK
I have no problems starting a process or application using the tips I got from this Forum.<br><br>But I need a VBScript, where the script continues after the process is done. But it has to wait until the proces is done.<br><br>This is what I thought of:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>While &lt;process is running&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Do nothing&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Wend<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;then continue doing something more&gt;</i><br><br>What I need is the function, that checks whether the process is running.<br><br>Or is there another way to do it?<br><br>Thanks<br> <p>Emil Mourier<br><a href=mailto: > </a><br><a href= > </a><br>
 
I solved the problem myself.<br><br>It turns out, that the <i>object.run method</i> has a parameter called <b>bWaitOnReturn</b>. All I had to do, was to set this parameter to <b>TRUE</b>.<br><br>My problem was that I didn't know, that the <i>Run Method</i> was a part of <i>Windows Script Host</i>, NOT <i>VBScript</i>.<br><br>More information on the <i>Run Method</i> on:<br><A HREF=" TARGET="_new"> <p>Emil Mourier<br><a href=mailto: > </a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top