LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SystemExec.vi working directory problem

he usual method for calling the *.exe file in LabVIEW is using the
System Exec.vi (in the Communications palette, as u are aware of).
Unfortunately, the System Exec call (working directory input)does not
support the options following the filename.

Here is what you can do instead:

1) Create a filename.bat file which calls the executable file with the
options following the title ("filename.exe -option1 -option2"].
2) Then use the LabVIEW System Exec VI to call the filename.bat file,
and those options will be ported over.

Hope this helps,
rkapoor
0 Kudos
Message 1 of 2
(2,843 Views)
I'm not sure I understand your statement "the System Exec call (working directory input)does not
support the options following the filename".
System Exec.vi in LabView 6.1 does support whatever command line options the called program supports.
Try these commands in the command line control of System Exec.vi:
explorer.exe c:\winnt\system32
(or any other directory) and you'll see Explorer open and display the specified directories contents.
Or, use notepad to create a small text file and save it as c:\eraseme.txt. Use Windows Explorer to view the properties of the file to confirm that's it's not read-only or hidden. Then run System Exec.vi with the following command line:
attrib.exe c:\eraseme.txt +r +h
Look at the file properties again and you'll see that i
t's read-only and hidden.
Message 2 of 2
(2,843 Views)