Why is StartInfo (ProcessStartInfo) always empty?

前端 未结 4 1112
长情又很酷
长情又很酷 2021-01-18 05:45

According to MSDN:

If you did not use the Start method to start a process, the StartInfo property does not reflect the paramete

4条回答
  •  有刺的猬
    2021-01-18 06:23

    Process.StartInfo appears to be empty always!!!

    I got entire running process list and try to dump values in StartInfo, but all 100+ processes' StartInfo fields are empty.

    From MSDN:

    "If you did not use the Start method to start a process, the StartInfo property does not reflect the parameters used to start the process. For example, if you use GetProcesses to get an array of processes running on the computer, the StartInfo property of each Process does not contain the original file name or arguments used to start the process."

    You'll have use WMI to get that info for now.

提交回复
热议问题