Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Waitforexit and return exitcode #27

Open
lordarokh opened this issue May 3, 2019 · 1 comment
Open

Waitforexit and return exitcode #27

lordarokh opened this issue May 3, 2019 · 1 comment

Comments

@lordarokh
Copy link

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?

@AndrewSav
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants