Traditional solution has been to set up a PIF file for the .exe or .bat file, and use the options in there to ensure that the window closes after execution. > -----Original Message----- > From: John Christenhusz [SMTP:[EMAIL PROTECTED]] > Sent: Wednesday, February 03, 1999 2:12 PM > To: Multiple recipients of list delphi > Subject: createProcess() running batch file > > Hi all, > > When I use the API call CreateProcess() to run a DOS exe or a batch file, > it doesn't close the window after execution. As a result the function call > CreateProcess() hangs. > > Any ideas why and how to solve this problem? > > Thanks, > > John Christenhusz > POSTEC DATA SYSTEMS Ltd. > PO Box 302-230 > Auckland, New Zealand > E-mail: [EMAIL PROTECTED] > Phone: 09-415.8803 > Fax: 09-415.9042 > > --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz