I am assuming your program is called "impact.exe" and the "-batch" switch
is an option for the impact program.
Create a dos batch file with two lines:
impact -batch
exit
Name the batch file runimpct.bat
Execute the system exec command:
cmd /k runimpct.bat
The first line of the batch file will run your program. The second line of
the batch file will close the command line console window.
Paul Brown
Jon Sweeney / ATS <[EMAIL PROTECTED]>@pica.army.mil> on 01/21/2004
09:46:09 AM
Sent by: <[EMAIL PROTECTED]>
To: Info-LabVIEW Mailing List <[EMAIL PROTECTED]>
cc:
Subject: re: How do you stop a windows program started with system exec?
Further expnanation on my earlier post (see below)
The application I am trying to terminate is started using a cmd /k command
to System Exec ("cmd /k impact -batch") which starts the application, so
the
DOS window and a couple of application windows are opened and need to be
terminated/closed.
Jon
------
Prior post:
What is the accepted method to terminate an application started with System
Exec if it doesn't terminate itself ? (from LabVIEW of course).
I am calling System Exec with "Wait for Completion"=F so that I can do a
timeout polling, and would like to stop the application after a certain
number of seconds or if a certain file gets too large, especially because
under some error conditions it starts to consume memory resources quickly.
(Using Windows XP and LabVIEW 6.0.2)
Thanks,
Jon