RunAndWait

Parent Previous Next

RunAndWait

Function to execute an external application and wait for the end of its execution.


Syntax:

Void RunAndWait(String path);
Executes an external application configured in the path parameter and wait for the end of its execution.


Void RunAndWait(String path, Int  timeOut);
Executes an external application configured in the path parameter and the timeOut of the execution; that is, if the execution of the application does not end until the timeOut limit, will be forced the end of the execution of the application.


Void RunAndWait(String path,String parameters);


Void RunAndWait(String path, String parameters, Int timeOut);


Params:

String path: A String parameter that contains the path where the application is located.

String parameters: A String parameter that contains the parameters for the application. For example: The file name that will be opened together with the application, the mode that the application will be run.

Int timeOut: An Integer parameter that contains the timeOut limit, in seconds, of the execution of the application.


Example:

Execute the application located at 'c:\app.exe' with 5 seconds of timeOut

  


SVApplications.RunAndWait("c:\\app.exe", 5);

 


Execute the application located at 'c:\app.exe' passing the parameter 'DEBUG=1'

  


SVApplications.RunAndWait("c:\\app.exe","'DEBUG=1");