The Windows command that you wish to run.
Default = .T. If .T., Display window. If .F., Hide window.
Default = -1. Length in milliseconds to wait before timing out. -1 = INFINITE.
Default = .F.. If a timeout occurs and this parameter is set to true, the created process will be terminated using a pattern that injects a thread into the new process and calls Exit Process. This is to prevent handles from remaining locked. Kill process (TerminateProcess()) does not release handles gracefully.
Run a program and wait until the program closes before returning.
The SYS_SHELL_WAIT() function runs a command and waits until it is completed before returning control to Alpha Anywhere.
When used in web or mobile applications, you cannot run any programs with SYS_SHELL_WAIT() that require user input. SYS_SHELL_WAIT() is executed on the Application Server in web and mobile applications, and the user cannot interact with the script.
Here is the code for using the DOS XCopy function to copy the contents of c:\alpha\newha\Practice Before Multiple States\*.* to c:\alpha\newha\test33\*.*.
sys_shell_wait("xcopy c:\alpha\newha\Practic~\*.* c:\alpha\newha\test34\*.* /E /Y",.t.)
The following example demonstrates using the timeout and terminateOnTimeout parameters:
SYS_SHELL_WAIT("CMD.EXE /C \"DIR C:\*.* /s\"", .t.,1000,.t.)