I'm trying to simply call an .EXE (Win32 console-) application from LabView 5, which works fine with EXEC. The problem is, that I cannot query the return code of the program afterwards. (The error output is always 0, no matter what the program has returned.) Anyone knows a nice short solution to that? Thanks!
I call an .EXE that returns with 0 when everything is ok and exits with an error code != 0 when there was an error. And I would like to get this error code (that can be queried with errorlevel in DOS) into LabView. (The info about exec didn't help me with that.)
Hi Ben, The problems in the called .EXE arise (usually) from the file system. Thats why I would not like to make the communication to LabView also file system dependent. Taking the standard output of the .EXE directly into LabView would be a solution. But how do I do that? Can I get the output of the program right into LabView? Into a string? Thanks anyways!
Somehow I think I may be missing something. (after looking around) What version of LV are you using? I am guessing 5.1 or earlier. LV 6 EXEC has standard output available.
If you are using LV 5.1.1 or so, I can only recomend the the re-directed solution. If file system is issue how about using a complete file spec starting with "c:"? Do you expect to be running on a machine that does not have a c drive?