LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

system exec vi launches console app but with blank screen

Solved!
Go to solution

Hello All

I am using the system exec to launch an external application, which is a console app.

When I double click the app, it runs normally and I get the console screen with messages.

When running the app using the system exec, the console screen opens but with no messages.

Moreover, I cannot kill the app using taskkill /IM ...

 

When using a non console app it runs and closes correctly. 

Does anyone has an insight?

I have attached a screen shot of my code.

 

Thanks!

Gil,

0 Kudos
Message 1 of 9
(1,338 Views)

Hello All,

I need to run a an external app using system exec VI.

When I ran a windows app all is working well, And I can start the app and then kill it.

 

But when I run a console app, I get a blank console screen, and cannot kill it.

I do get the output in the "standard output" window but I want this data to appear at the console.

Who has an Idea?

Thanks!

Gil,

0 Kudos
Message 2 of 9
(1,324 Views)
Solution
Accepted by topic author GilMaor

Change the boolean input "wait until completion" to false.

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 9
(1,312 Views)
Solution
Accepted by topic author GilMaor

Hello Rolf first of all thanks

I have done as you suggested, 

The app does open.

But I can not close it using using "taskkill /IM"

thanks!

Gil,

 

0 Kudos
Message 4 of 9
(1,305 Views)

Ok, I have found the problem of not being able to close the app.

The app name had a "space".

I removed the space and the app is closed.

Thanks!

0 Kudos
Message 5 of 9
(1,289 Views)

@GilMaor wrote:

Ok, I have found the problem of not being able to close the app.

The app name had a "space".

I removed the space and the app is closed.

Thanks!


It might have worked if you had used taskkill /IM "Vacuum Tester.exe"

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 9
(1,253 Views)

Thanks!

0 Kudos
Message 7 of 9
(1,208 Views)

On a side note I have found that depending on your Windows UAC settings LabVIEW programs my not have the permissions necessary to taskkill an application even though it has the permissions to launch it.

 

I ran into that when I wrote a LabVIEW GUI for Iperf.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 8 of 9
(1,201 Views)

thanks,

the problem was the space in the app name.

After removing the space taskkill worked just fine

0 Kudos
Message 9 of 9
(1,187 Views)