ShellExecute does not exit when done 
Author Message
 ShellExecute does not exit when done

Hello all,

I am writing an app that uses ShellExecute to initiate a process. The
problem is that unless I specify SW_SHOWNORMAL and manually close the
resulting DOS window, the process will not exit once finished, and I
have to close it using the task manager (Winoldap). I want to run the
process without a DOS window, and have it close when finished. Can you
help me with whatever syntax I'm missing?

LPCTSTR Operation = _T("open");
LPCTSTR File = _T("pkzip");
temp.Format("%s %s", OutputFile, InputFile);
LPCTSTR Parameters = _T(temp);
ShellExecute(NULL, Operation, File, Parameters, NULL, SW_HIDE);

Thank you for your time
Errol Alpay

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Fri, 02 Aug 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. static member inheritance not doing what I want...

2. Class not registered when doing COM interop

3. Strings doing what they are not supposed to...???

4. _open not doing the right thing

5. Enter key on dialog embedded in dialog not doing OnOK

6. CTreeCtrl is not doing the business

7. AppWizzard not doing static dll option

8. ShellExecute cause app to exit

9. ShellExecute causes app to exit

10. ShellExecute program's exit code

11. System.Threading.Timer , am I doing this correctly ?

12. Threading problem. I'm doing something wrong

 

 
Powered by phpBB® Forum Software