Kill some processes by .exe file name

后端 未结 6 953
情深已故
情深已故 2020-11-27 02:45

How can I kill some active processes by searching for their .exe filenames in C# .NET or C++?

6条回答
  •  情话喂你
    2020-11-27 03:01

    If you have the process ID (PID) you can kill this process as follow:

    Process processToKill = Process.GetProcessById(pid);
    processToKill.Kill();
    

提交回复
热议问题