C# - Making a Process.Start wait until the process has start-up

前端 未结 12 2123
迷失自我
迷失自我 2020-11-27 17:12

I need to make sure that a process is running before moving on with a method.

The statement is:

Process.Start(\"popup.exe\");

Can y

12条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-27 17:43

    Are you sure the Start method returns before the child process starts? I was always under the impression that Start starts the child process synchronously.

    If you want to wait until your child process finishes some sort of initialization then you need inter-process communication - see Interprocess communication for Windows in C# (.NET 2.0).

提交回复
热议问题