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:
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.
Try putting a CMD /C in front of it.
ie. "cmd /c RawPack.exe < input.txt"
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 🙂
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...