Open Chrome from command line and wait till it's closed

后端 未结 3 2132
后悔当初
后悔当初 2021-02-13 01:29

I\'m using following code to iterate over a list of browsers executable paths and start each of them:

foreach (var browser in browsers)
{
    var proc = new Proc         


        
3条回答
  •  无人及你
    2021-02-13 02:19

    You could find all the child processes of the Chrome process you run and then wait for them to finish.

    There is a StackOverflow question that has some useful code: Find all child processes of my own .NET process / find out if a given process is a child of my own?. Also you might find this useful: Monitor child processes of a process.

提交回复
热议问题