From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SystemExec.vi working directory problem

I am trying to use the SystemExec.vi to open an executable file in a non-labview directory. If I enter the entire path and executable name in the VI's command line input everything works as expected {C:\temp\test\software\program.exe}. If instead, I enter the path in the working directory input {C:\temp\test\software} and the executable name in the command line input {program.exe} I get error code 2. Am I missing something with the syntax or is this VI defective or ???

Labview 6.1, Windows 2000

Any help would be appreciated!!
0 Kudos
Message 1 of 5
(2,607 Views)
I believe the working directory is where any output files would be placed if not specified otherwise.



Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 5
(2,607 Views)
Command line: C:\temp\test\software\program.exe
Working Dir: C:\temp\test\software

See attached (6.0.2)

ian
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
Message 3 of 5
(2,607 Views)
This is the correct solution...

Note any shortcuts you have in Windows 2000. The full path and working directory are listed as stated above.
0 Kudos
Message 4 of 5
(2,607 Views)
A better solution for System Exec.vi here
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 5 of 5
(2,607 Views)