From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-17-2014 01:29 PM
LaunchExecutableEx() is not returning an error (-4 or -3) event though path to the file does not exist on the PC I'm runing the application on. It returns 0 (as if the exe was sucessfull).
Thanks,
Mira
Solved! Go to Solution.
10-18-2014 04:50 AM
It would be useful to add some more details, version of OS and CVI...;
For me, when running LaunchExecutableEx () (CVI2013SP2 and Win7 64 bit) with a non-existing file ("C:\test.exe") I receive error -19 (The operating system returned an unknown error code).
11-04-2014 11:56 AM
I am currently using WIndows XP and Lab Windows 10.0.1
The LaunchExectuableEx returned no error even though the path or file were not existing.
11-05-2014 06:03 PM
Can you post a snippet of your code and explain what the intent of the code is?
11-06-2014 08:29 AM
Hi Steve,
status = LaunchExecutableEx ( command, LE_SHOWNORMAL, &ExecHandle.crt );
I launch Java script that will perfrom certain operation and write result to a file. I'd like to be able to distinguish when the executable did not launch vs, when executable failed to perform it's operation (due to some other reasons). When the executable is in the path the LaunchExecutableEx will launch it, but when it's not there the LaunchExecutableEx still returns 0.
11-07-2014 05:10 PM
Do you see this behavior only in this code you wrote? Does the same thing happen when you run the launchexe example as well? (In Example Finder: Communicating with External Applications>>Operating Systems>>launchexe.cws)
When I run this example and select a non-existant file, I receive error code -3 (File was not found) as expected.
11-11-2014 10:23 AM
The example works. I thing I understand the problem.
What I pass to the LaunchExecutable isn't just path to exe. I pass java -jar + path to exe + path to XML. All LaunchExecutableEx knows is that it launched java -jar (hence it returns 0). Path to java executable is irrelevant to LaunchExecutableEx.
I guess I'll have to do something else prior to call to LaunchExecutableEx to verify that java executable and XML are present.
11-12-2014 11:26 AM
There's a FileExists function in the Programmer's Toolbox
11-12-2014 11:30 AM
Thanks!