LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

call DOS-based exe file

Hi,

I have a DOS-based EXE file. When run it at DOS command window, it needs input 2 parameters at two rows respectively.
Now I want to call this exe file in Labview, How do I do?

I tried System Exec.vi, but I dont know how to pass the two parameters in the "stand input".

Detailed, my dos-base exe file runs at DOS command window like this:

c:abc.exe (click carriage return)
Input parm 1: a1
Input parm 2: a2

In the "command line" of the System Exec.vi, I can put "abc.exe", but how I can put the two input parameters "a1" and a2 at the standard input.

Thanks.

RED
0 Kudos
Message 1 of 5
(2,919 Views)
Hello,

You can pass your parameters i the command line, like if you were calling the app in the dos prompt.
So you can make abc.exe a1,a2.

Hope this helps,
Paulo
0 Kudos
Message 2 of 5
(2,913 Views)
Thanks for your reply. But I still can not pass the two parameters in "command line" of System Exec.vi. For example, in the command line I put "abc.exe a1, a2", the DOS window was opened, still prompting me input a1, a2. Then another strange thing happened, when I input a1, a2, the DOS exe file seems not execute and quickly returns to Labview panel.

Do you know what should I do?

Thanks
0 Kudos
Message 3 of 5
(2,913 Views)
Check the following: http://forums.ni.com/ni/board/message?board.id=170&message.id=123429

Paolo
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 4 of 5
(2,882 Views)
Have you tried using /codes? /r for return??? I haven't tried that but I don't have an exe that is looking for params like yours.

-Brett
0 Kudos
Message 5 of 5
(2,863 Views)