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.
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.
04-14-2011 03:35 PM
Hello,
I need to run an executable called RawPack.exe in Labview that uses consistant user inputs.
For example, the exe will always ask the following questions in the cmd window:
1. Adapter number?
2. Sender IP Address?
3. Sender Port?
4. Receiver IP Address?
5. Reciever Port?
The resonse to these will always be:
1. 3
2. 128.254.0.1
3. 5001
4. 128.254.0.2
5. 5001
I can use System Exec.Vi to run the executable but I would like the the program to automatically put in those inputs when prompted.
How can I do this?
Alternatively, I have made an input file called "input.txt" that lists the 5 inputs.
By typing "RawPack.exe < input.txt" in the cmd window, the program runs automatically without needing user prompts.
I tried this in the System Exec.Vi "command line" but it gives me an error saying file is not found.
Please help.
04-14-2011 03:49 PM - edited 04-14-2011 03:50 PM
Try putting a CMD /C in front of it.
ie. "cmd /c RawPack.exe < input.txt"
04-15-2011 09:09 AM
I did, that doesn't work.
04-18-2011 12:25 PM
You may want to use a virtual keuboard to generate keystrokes. Take a look at this: http://zone.ni.com/devzone/cda/epd/p/id/4509 🙂 and here is the Windows API information http://msdn.microsoft.com/en-us/library/ms646304.aspx
This may also Help: http://decibel.ni.com/content/docs/DOC-4957 🙂
04-18-2011 04:06 PM
Create a BAT file that works. Then call this BAT file from System Exec.
I had to do this unreleated to LabVIEW and I don't remember the issues why...
Felix