>Dear all ,
> Besides RUN command in Foxpro ,how can I exec a file ?
> Coz I hate the DOS prompt dialog and I need to pass a set of string to the program (Something like "run abcdefg a.txt b.bat cde".
> I try to find the method in books and the help file of Foxpro ,but still no idea about that .
You can try the API_APPRUN class, which can be downloaded from the FIles Section on UT. This uses the CreateProcess() API, which will run either Windows or DOS Executables.
The native FoxPro RUN command will pass command line parameters to an executable fired by it, with a few exceptions (parameters like /N which are used by the RUN command itself.)
The example given above, assuming that there is an executable named abcdef with a .BAT, .COM or .EXE extension in the current directory or on the search path is completely legal. additional values on the command line are passed as parameters. You can only pass string values to a command line. If you need to pass the content of variables, use macro expansion to extract their values as a part of the command line.