09-25-2008 09:14 AM - edited 09-25-2008 09:22 AM
Hello, first time posting a question!
I have spent a good while trying to find an already posted answer to this, and looking on the wider web, hope i have not just missed it.
I am using XP Pro SP3, LV 8.6.
I am not very familiar with Windows command lines and structures etc.
I am using the System Exec VI to start a third party piece of software. I have wired the path in to the path input, and if i wire cmd /c start xxx to the command line terminal the VI will run and start the software application (xxx.exe). As the VI executes the cmd window clunks open and closed. If i run the VI without the cmd /c part of the command then an Error 2 is returned (as widely reported by others).
Is it possible to open an application without the cmd window opening and closing?
Using the System Exec VI it is possible to open NotePad just by wiring 'NotePad' to the comand line terminal. Is it possible to place the third party software somewhere, or register it with the OS somehow so it could be started in the same way as NotePad (i.e. without the cmd window flashing up)?
Thanks...
Blue
09-25-2008 10:08 AM
To prevent the cmd window flashing up, have you tried wiring a True boolean to the Run Minimized? terminal of System Exec.vi ?
Notepad can be opened without providing its full path because it resides in the windows PATH environment. In a command window, type PATH to see your local PCs registered paths. Notepad is in C:\Windows on my machine, and most likely on yours also, which is typically always registered. If you added your third party program folder to the PATH list, it would be found without having top provide the full path.
09-25-2008 01:49 PM
Hi Thoric, thanks for the suggestions, Success!
I tried the True boolean to the Run Minimized, but it did not help.
Changing the Environment Path string to include the path to the directory containing the application did work (once i had worked out the syntax).
On to the next problem....
Cheers,
Blue
01-17-2017 10:13 AM
Hello All,
I have a .bat file which I run using System Exec VI.
After starting, the user will be required to hit 1 twice so that the programme can be executed. I want to avoid hitting the keyboard, so I can send this through labview so my programme runs fully Automated without any Input from the user.
I tried this without success maybe someone has an idea how I can implement this. Also I will like to read the result from the cmd window after the execution.
thanks in advance for your suggestions.
01-17-2017 01:06 PM
The original thread was made 9 years ago, and asks about running a program with command line switches minimized. Your question seems to be mostly unrelated. I'd suggest making a new thread, or searching for a way to use StdIn/Out or simulating keyboard presses with software.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
01-17-2017 01:19 PM
thanks for the suggestion.