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
(276 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
(262 Views)
Solution
Accepted by GilMaor

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

Rolf Kalbermatter
Averna BV
0 Kudos
Message 3 of 9
(250 Views)
Solution
Accepted by 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
(243 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
(227 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
Averna BV
0 Kudos
Message 6 of 9
(191 Views)

Thanks!

0 Kudos
Message 7 of 9
(146 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.

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 8 of 9
(139 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
(125 Views)