05-23-2011 02:42 PM
From the DOS command line, I can start an external program; tell the program a file to open; and activate some switches. From system exec, the program can't find or open its open file, althougth the error seems to have the correct file name. What could be the problem? I've tried all sorts of variations in configuring the LV code.
05-23-2011 03:34 PM
I've recently had similar difficulties. I've found:
1) use a System Exec command similar to "cmd /c c:\*\myBatch.bat"
2) create a .bat file to run instead of trying to run the program directly
3) avoid spaces in names.
4) Your batch file will probably look like:
Path=C:\Program Files\My Program
myprogram.exe -a -b -c
Adam
05-23-2011 04:07 PM
The thing you have to remember is that System Exec is really more like using the Start -> Run command. It is not the same as having a command window open. Thus, if you cannot enter a valid command via Start -> Run, then your command will not work with System Exec as is. Usually you can use cmd /c or cmd /k as suggested to get the command window "environment". In some cases you need to resort to a batch file to get it working.
05-23-2011 04:31 PM
The problem was the extra line feed after the command.
Thanks.