> I need to execute 2 applications from an application or batch
> file. The first app launched has the user enter a product key and the
[quoted text clipped - 3 lines]
> Using ShellExecuteEx() does not return the exit code of the
> first app.
Use SEE_MASK_NOCLOSEPROCESS flag, and you will get an hProcess HANDLE to
the new process. Wait for the process to terminate with
WaitForSingleObject, then obtain its exit code with GetExitCodeProcess.
Don't forget to call CloseHandle on your handle.
Or you can use CreateProcess instead of ShellExecuteEx, then proceed as
above. Remember that in this case, you get back two handles (for the
process and for the main thread of that process), both of which you need
to close.

Signature
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
Micus - 23 Jun 2005 21:45 GMT
> > I need to execute 2 applications from an application or batch
> > file. The first app launched has the user enter a product key and the
[quoted text clipped - 13 lines]
> process and for the main thread of that process), both of which you need
> to close.
Thanks Igor, I'll give it a shot,
M
Micus - 24 Jun 2005 09:45 GMT
> > I need to execute 2 applications from an application or batch
> > file. The first app launched has the user enter a product key and the
[quoted text clipped - 13 lines]
> process and for the main thread of that process), both of which you need
> to close.