CreateProcessAsUser
CreateProcessAsUser copied to clipboard
Waitforexit and return exitcode
Hi There,
I was wondering how is it possible to wait the process that has been started to exit and return the exit code, instead of process ID?
That needs to be done outside of "CreateProcessAsUser" by using appropriate windows API. You can google for the particular APIs to be used, but I suspect it will be along the lines of WaitForSingleObject / GetExitCodeProcess. You will need to find how to interop these calls to .net and then you'll need experiment a bit with the exact sequence of calls that does what you want.