Discussion:
how to close an exe file on windows operation system from labview ?
(too old to reply)
Doran
2006-08-03 07:10:08 UTC
Permalink
Hi all ,
 
I have an exe application running from my labview program i want to teminate this application ,after some amount of time ,
My question is :
how to close an exe file on windows operation system from labview ?
 
I have labview 7.1 running on windows xp ,
 
Please send any ideas ,
Thanks
doron
 
devchander
2006-08-03 11:10:07 UTC
Permalink
go to Block diagram>>functions palette>> applications control>>quit LabVIEW
By passing a 'true' boolean to this function, you can quit/ close the application/LabVIEW
So when you want to close your executable, include code to pass a true boolean to this function on your Block Diagram
Doran
2006-08-03 11:40:07 UTC
Permalink
Hi devchander ,
 
Thanks but the exe file is outside program not one i created in labview
and second  i would like my vi to stay open .
 
 
thanks
:robottongue: 
zou
2006-08-03 14:10:12 UTC
Permalink
If the window name never change, you can use lvwutil32.zip (you can download it from NI) to Quit Application.
 
If the window name is not available, try ExtApp at:
    http://gtoolbox.yeah.net
zou
2006-08-03 20:10:07 UTC
Permalink
Wiebe's method works.  But it's a little bit "brutal".  Should be used as last resort.  If you search Microsoft for "teminating a process", you will find they recommand other methods.
NI's VIs, on the other hand, provide a nice way to close other applications.
 
 
George Zou
<a href="http://gtoolbox.yeah.net" target="_blank">http://gtoolbox.yeah.net</a>
&nbsp;
zou
2006-08-07 14:10:09 UTC
Permalink
Wiebe wrote:
&gt;Sending a windows message is nicer. But it won't work on command line programs. Do you have any idea what method NI use?
&nbsp;
Are you sure about this?&nbsp; I just tried to close DOS windows (command prompt and&nbsp;cmd.exe), works fine.
NI's method uses Windows message.
&nbsp;
George Zou
<a href="http://gtoolbox.yeah.net/" target="_blank">http://gtoolbox.yeah.net</a>
&nbsp;
&nbsp;Message Edited by zou on 08-07-2006 09:05 AM
zou
2006-08-09 14:10:09 UTC
Permalink
For hang window, send message won't work for sure.&nbsp; Terminate process would be a good choice.
But be aware that it terminates the process right away.&nbsp; The process won't even get a chance to close the dll its calling.
&nbsp;
&nbsp;
George Zou
<a href="http://gtoolbox.yeah.net" target="_blank">http://gtoolbox.yeah.net</a>
&nbsp;

Loading...