User Tools

Site Tools


Back to Script Function Reference


The Run_Program() function runs a program/application and optionally waits until it terminates before continuing with the script.




Argument Required Description
filenum/filename Yes The number of the file set in the script's associated files list that you want to execute, or the absolute path\filename you want to execute. If this file is not directly executable, it will be run with its default program (e.g. if you set the file to be a text file, it will probably be opened in notepad). If you are using an absolute path\filename, any script environment variables found in filename will be replaced by their actual values when the script is executed.
clp No The text to add to the command line of the program being executed. Any script environment variables found in clp will be replaced by their actual values when the script is executed. To specify no command line parameters, set this to an empty string (see example 1). If the script is set to use long filenames, any replaced environment variables that correspond to a filepath or filename will be surrounded by double quotes (“”) only if they contain a space character.
waitflag Yes This must be one of two literal strings: WAIT or NOWAIT. If you want the script to pause until the executed program has terminated before continuing, set this parameter to WAIT, otherwise set it to NOWAIT.





When specifying the WAIT flag to pause until the executed program has finished, please note that this only waits on the program being run (as specified in the filenum/filename parameter). If this program launches another program then immediately closes, the script will continue as soon as the first program has closed (the second launched program will not be waited on).

See Also

gemus_script_reference/functions/run_program.txt · Last modified: 2023/10/04 14:15 by