uCon HomePage

Script Cmd: SYSTEM

SYSTEM [-pw] {"cmdline"}

Process a command line as a local, PC-resident command. The entire command line must be in double quotes.

-p     run "cmdline" as a seperate process; thus allowing SYSTEM to return immediately.
-w    wait for process set up with -p to terminate.

If no options are specified, the "cmdline" string is simply passed to the system() WIN32 function. The -p option causes the command to be invoked using CreateProcess(), then if -w is used, it will wait for the process to terminate by calling GetExitCodeProcess() every second until that process terminates. Using -pw on the command line together is essentially the same action as not using either of the options; however, the underlying code is different.

Refer to the main scripting page for an example using SYSTEM to play a .WAV file.