12-14-2015 09:07 AM - edited 12-14-2015 09:08 AM
Hi All,
Has anyone tried using what's described here:
http://digital.ni.com/public.nsf/allkb/E5CC7B2073D4FC1A8625742D006CE492
If so, I'd be grateful if you could post your code - I can't seem to get it to work.
I've attached my VI, and the batch file that calls the built EXE version of it.
I would hope that when run from the command prompt, example.bat would echo "1", as this is what I'm trying to write to "status".
Thanks,
Dan
12-14-2015 02:59 PM
12-15-2015 07:10 AM - edited 12-15-2015 07:19 AM
It doesn't look like it's possible - perhaps it's a good idea for the NI Ideas Exchange. I would have expected it to be an Application property/method you could write to, just like you can read in command-line arguments on launch.
Unhelpful, but as a point of interest, it does look like it is possible (in some form) in TestStand - http://zone.ni.com/reference/en-XX/help/370052M-01/tsuiref/reftopics/applicationmgr_exitcode_p/
Using the solution in the article does not seem like a good idea as it will immediately kill your application - if you're sure everything has shut down correctly then perhaps you could do it as the last call but generally it's better to close all your front panels and let LabVIEW exit gracefully.