I need to check status of an application created with ShellExecute and if the application is waiting user input, then I need to terminate it.
It should look something like:
iProc := ShellExecute(...);
while OpenProcess(PROCESS_QUERY_INFORMATION, False, iProc) > 0 do begin
??? if application awaiting user input then ???
??? Terminate application ???