LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using sys exec with parameters

Hi all,
I have used sys exec cmd to call a DOS .exe program from my LabVIEW but now I need to pass in a parameters.
If I need pass in a parameter to that executable like "xx.exe parameter",  can I concatenate "xx" and "parameter" and C/R to the sys exec vi?
Thanks in advance.
0 Kudos
Message 1 of 4
(4,177 Views)
You should be able to concat the command and parameters.  I've heard of cases where this didn't work well.  If it doesn't, try inputting the command string into SysExec's "command line" input, and the parameter string into the "standard input".
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 4
(4,173 Views)
Yes, it should work for cases such as launching executables which accept command line arguments; if you create a simple text file named text.txt on your C drive, the following string used for the "command line" input should open that text file in notepad:
 
notepad.exe "C:/test.txt"
 
I hope this helps!
 
Best Regards,
 
JLS
Best,
JLS
Sixclear
0 Kudos
Message 3 of 4
(4,156 Views)
Also, if this doesn't work, you can follow the advice found in the help for the function and create a batch file which will run the executable and then run that batch file.

___________________
Try to take over the world!
0 Kudos
Message 4 of 4
(4,148 Views)