LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CMD.exe is still running after System Exec.vi

Hi,
 
I'm currently trying to use the System Exec.vi to launch files and applications by writing the action to do in a constant bat file and calling this bat file( to avoid synthax problems). I've remarked that a cmd process is active while the file or application launched previously is opened. It uses more CPU and sometimes disables the new cmd command passed.
I've already tried to change the wait until completion constant but, in every case the cmd process only stops when we stop the process it had launch.
I'd like to know if it's possible to avoid this multiple cmd by killing ther cmd window after it has complete its task?
 
I'm looking forward to your answer.
Thank you in advance.
 
 
Bim
0 Kudos
Message 1 of 3
(2,889 Views)

Hi Bim,

I remember that i had a similar problems years ago.  First of all the cmd.exe should stop if your batch program ends. But I noticed that this was not the same in all windows platform.

I solved it with the creation of a 'ready' file. At the end of the batch file you create a 'ready' file to tell LV that the batch file is ready so it can proceed. Before you start the batch file you delete this 'ready' file in LV.

It's not nice but it works.

Message 2 of 3
(2,860 Views)

Please see the link below:
http://forums.ni.com/ni/board/message?board.id=170&message.id=79683&requireLogin=False

It should solve your problem

Regards,

Sanaa T

Sanaa T.
National Instruments France

0 Kudos
Message 3 of 3
(2,836 Views)