RE: Captures information from a ShellExecute

2009-10-11 Thread John Dammeyer
-Original Message----- > From: delphi-boun...@elists.org > [mailto:delphi-boun...@elists.org] On Behalf Of Ross Levis > Sent: Friday, October 09, 2009 4:07 AM > To: 'Borland's Delphi Discussion List' > Subject: RE: Captures information from a ShellExecute > > >

RE: Captures information from a ShellExecute

2009-10-11 Thread John Dammeyer
Hi David, That might work. I can then remove the 'pause' the program does waiting for key input. The faultlikes with the PK2CMD.EXE because it can be told to pause and wait for a key but it only does that if there isn't an error. John > John, > > Would it help to run a command (batch) file, wit

RE: Captures information from a ShellExecute

2009-10-10 Thread Brendan Blake
There are not many replies to this one, so let me post my own routine, which uses CreateProcess and finally GetExitCodeProcess. Written years ago (and probably shows it) this successfully returns the exit code from a command or another program. It's always worked for me, and I just tested it agai

Re: Captures information from a ShellExecute (John Dammeyer)

2009-10-10 Thread Jon Grewer
See http://www.latiumsoftware.com/en/delphi/3.php In particular notice: GetExitCodeProcess(proc_info.hProcess, ExitCode); On Fri, Oct 9, 2009 at 8:00 AM, wrote: > Date: Fri, 9 Oct 2009 00:57:36 -0700 > From: "John Dammeyer" > Subject: Captures information from a ShellExecute > To: "'Bo

RE: Captures information from a ShellExecute

2009-10-10 Thread Ross Levis
It is the ExitCode you need to test for. GetExitCodeProcess(ProcessInfo.hProcess,ExitCode); You can test ExitCode = Still_Active if you wish to wait in a loop until the process finishes. Ross. -Original Message- From: delphi-boun...@elists.org [mailto:delphi-boun...@elists.org] On Behal

Re: Captures information from a ShellExecute

2009-10-10 Thread David J Taylor
From: "John Dammeyer" <> Sent: Friday, October 09, 2009 8:57 AM To: "'Borland's Delphi Discussion List'" Subject: Captures information from a ShellExecute Hi, [] The shell executes and returns immediately as it probably should. The Command Line window stays open until the pktcmd.exe finish