LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

system exec cmd window

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 

Message Edited by BlueTwo on 09-25-2008 09:22 AM
0 Kudos
Message 1 of 6
(3,781 Views)

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.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 2 of 6
(3,758 Views)

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 

0 Kudos
Message 3 of 6
(3,733 Views)

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.

0 Kudos
Message 4 of 6
(2,814 Views)

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.

0 Kudos
Message 5 of 6
(2,800 Views)

thanks for the suggestion.

 

0 Kudos
Message 6 of 6
(2,792 Views)