09-17-2014 11:29 PM
Oh, and in Win7 you no longer need quotes if your path contains spaces. Also works in Vista. I'm assuming it will work in the system exec the same way.
09-18-2014 08:54 AM
@billko wrote:
Oh, and in Win7 you no longer need quotes if your path contains spaces. Also works in Vista. I'm assuming it will work in the system exec the same way.
WHHHAAA! Mind blown.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-18-2014 09:09 AM - edited 09-18-2014 09:11 AM
I'm sorry. I forgot that is only when you're navigating the tree.
that's what i get for replying right before going to sleep.
09-18-2014 10:52 AM - edited 09-18-2014 10:53 AM
@billko wrote:
I'm sorry. I forgot that is only when you're navigating the tree.
that's what i get for replying right before going to sleep.
Okay it worked in a command prompty. I opened a command prompt and typed dir C:\Program Files and it worked. But when I tried it with System Exec it didn't. Oh well.
Edit: Never mind, couldn't get it to work, the test I did first was CD C:\Program Files and that worked in a command prompt, which I think always worked.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-18-2014 11:40 AM
actually none of these things have worked. i've tried cmd /c as well as the quotes and the file is still not opening.
is there any information on what the return code means? that might shed some light on what the error is
09-18-2014 01:04 PM - edited 09-18-2014 01:17 PM
I think the error is not related to how you call the executable from LabVIEW, i.e. how the command line looks like.
I guess the return code comes from your executable. Is this something what you developed?
Do you get something back in the 'standard output' ? I still suspect this is some kind of memory issue or the executable is using the same resources as LabVIEW. Or maybe the working directory is important. On my PC the system exec.vi opens in c:\windows\system32, but when I open cmd.exe in WIndows, it goes to my user directory.
09-18-2014 01:40 PM
It may be not relevant to your problem, but I found something online.
Error result -1073740777 returned from 'C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\cl.exe'
09-18-2014 01:55 PM
actually nothing comes in from 'standard output' the indicator is blank - also the path is correct, i'm sending the system exec the path.
the executable is something a 3rd party developed for us, previous versions worked fine, but this one has this strange issue where the flags cause the program to not open from labview and returns the error code..
if the return code is something that is sent by the executable that could be interesting. not quite sure what that code means
09-18-2014 03:38 PM - edited 09-18-2014 03:52 PM
The feature to try to match paths that contain spaces is part of the command shell utility. It only will work if you add the cmd /c in front of the call. If you try to execute the executable directly (which is absolutely valid) there is no nice suger layer but the command line gets more or less directly passed to the Windows CreatProcess API which only does basic command line parsing, such as splitting the command line into arguments at every space, except when these spaces appear in a quoted string.
And your error code -1073740777=0xC0000417 means STATUS_INVALID_CRUNTIME_PARAMETER.
Most likely it is the exit code from your program, or maybe just the exception code that your program throws when calling one of the Visual C runtime functions with invalid arguments and that CreateProcess() catches and returns to your application.
09-18-2014 05:11 PM
rolfk - thanks! that seems to indicate the error is on the windows side. I also checked and found this in the windows log
Faulting application name: WTTServer (10).exe, version: 1.0.0.0, time stamp: 0x541b3fd5
Faulting module name: MSVCR100.dll, version: 10.0.40219.1, time stamp: 0x4d5f0c22
Exception code: 0xc0000417
Fault offset: 0x0008af3e