winexec

Executes a Windows program.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X        

Syntax

void winexec(command[,wait])
string       command
int          wait

Description

Executes a command in the Windows environment.
command specifies the command to execute. If you do not want to provide a fully qualified path to the executable, then use the os_add_path entry in the dv.ini file to specify the executable's directory.

wait (optional) specifies timing. If it is true (non-zero), the executed command must terminate before the application can continue (synchronous). Default is asynchronous.

Example

winexec("c:\bin\aprg -a");
To run a command, use cmd:
winexec("cmd /c mkdir c:\tmp");