exec (STRING* program, STRING* options)

Opens an external program, document, URL, or batch file.

exec_wait (STRING* program, STRING* options)

Opens an external program, document, URL, or batch file, and waits for its termination.

Parameters:

program - file name of the exe, batch file, or document, or URL to be opened.
options - command line parameter string to be passed to the program, or NULL for no command line options.

Returns:

0 if the program was not found or could not be started, nonzero otherwise.

Speed:

Slow

Remarks:

Examples:

exec("%EXE_DIR%\\acknex.exe","samples\\terrain.hmp"); // open terrain in another engine window
exec("notepad","test.txt"); // open notepad
exec("%PROG_DIR%\\internet explorer\\iexplore.exe","http://www.3dgamestudio.com"); // open an URL with Internet Explorer exec("http://www.3dgamestudio.com",NULL); // open an URL with the standard browser

See also:

PATH, sys_message, sys_active

► latest version online