cancel
Showing results for 
Search instead for 
Did you mean: 

system exec vi launches console app but with blank screen

SOLVED
GilMaor
Member
Solved!

system exec vi launches console app but with blank screen

Message contains an attachment

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,

8 REPLIES 8
Highlighted
GilMaor
Member

console external app not working properly

Message contains an attachment

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,

rolfk
Knight of NI
Solution

Re: console external app not working properly

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

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
GilMaor
Member
Solution

Re: console external app not working properly

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,

 

GilMaor
Member

Re: console external app not working properly

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!

rolfk
Knight of NI

Re: console external app not working properly


@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
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
GilMaor
Member

Re: console external app not working properly

Thanks!

RTSLVU
Trusted Enthusiast

Re: console external app not working properly

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 ===
========================
GilMaor
Member

Re: console external app not working properly

thanks,

the problem was the space in the app name.

After removing the space taskkill worked just fine