02-23-2009 08:31 AM
I searched for this problem but I can't seem to find the exact solution. I have 4 batch files that I can double-click and they work fine. However, when I try to run these .bat files in LV with the System Exec VI I get "blahblablah file not found" errors. How can I duplicate double-clicking on a .bat file in LV?
02-23-2009 08:35 AM
Hi PaulG,
how do you call your bat files? Normally it should work with the System Exec vi.
Mike
02-23-2009 08:39 AM
02-23-2009 08:43 AM
Hi PaulG,
maybe you get the same behavior as a double click if you use the "ShellExecute" function from the shell32.dll.
Hope it helps.
Mike
02-23-2009 11:44 AM
02-23-2009 01:40 PM
Hi PaulG,
see the attached vi please. For me it works as expected.
Mike
02-24-2009 01:49 PM
Hi PaulG.,
I have found this article (KnowledgeBase 18T91CVJ: After Running a Batch File with the System Exec VI, the Command Window Rema...), which offers a couple of options for forcing the .bat file to close. I would try adding the "exit" command to your batch file.