Process.WaitForExit not waiting

℡╲_俬逩灬. 提交于 2019-12-06 11:07:30

I strongly suspect that Andrey's comment is right - the process you're starting is exiting, but having started a new process itself.

The simple way to find that out is to print out process.Id before calling WaitForExit, and then try to find that process in task manager. I suspect you'll find it won't be there.

You may want to loop round, sleeping briefly while waiting for another indicator of the uninstall being finished - such as a particular file or registry entry being removed. Not ideal, but it may be the best you've got.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!