PDA

View Full Version : Running a Program and Waiting for it to Finish


Desmond
09-26-2003, 10:26 AM
<HTML> <HEAD> <TITLE>Running a Program and Waiting for it to Finish</TITLE> </HEAD> <BODY> <h3>Running a Program and Waiting for it to Finish</h3> <b>Document ID: IR10017</b> <hr> The information in this article applies to: <ul> <li>AutoPlay Media Studio 5.0 Standard Edition</li> <li>AutoPlay Media Studio 5.0 Professional Edition</li> </ul> <hr> <h3>SUMMARY</h3> <p>This article describes how to run a program and have your application wait until the program exits before continuing. </p> <h3>DISCUSSION</h3> <p>Using AutoPlay Media Studio 5.0, you can launch an executable file, and have your application wait until that executable file exits.<br> <br> As an example we will run the executable example.exe, and have the application wait until example.exe is closed. This is accomplished by using the File.Run action, and setting the WaitForReturn property to true:<br> <br> <code>File.Run("c:\\example.exe", "", "", SW_NORMAL, true);<br></code> <br> This action will launch example.exe, and wait until example.exe is terminated. </p> <h3>MORE INFORMATION</h3> <p>For more information please see the following topics in the AutoPlay Media Studio 5.0 help file:</p> <ul> <li><b>Program Reference | Actions | File | File.Run</b></li> </ul> <p> KEYWORDS: AutoPlay Media Studio 5.0, Actions, Wait, Run, Finish, Exit</p> <hr> <FONT SIZE=1> Last reviewed: September 26, 2003<br> Copyright © 2003 <A HREF="http://www.indigorose.com" target="blank">Indigo Rose Corporation</a>. All rights reserved.<br> </FONT> </BODY> </HTML>