I'm having problems killing a labview process. I'm using this code so far:
string NombreProceso = "FORD EPB FINAL Laser";
Process[] ps = Process.GetProcessesByName(NombreProceso);
if (ps.Count() == 0)
{
TextBox_Eventos.AppendText("[+] " + DateTime.Now.ToString("hh:mm:ss") + " | No se encontró proceso\n");
return;
}
foreach (Process p in ps)
{
p.kill();
TextBox_Eventos.AppendText("[+] " + DateTime.Now.ToString("hh:mm:ss") + " | Cerrando proceso\n");
}
The problem is that the process is not finishing (looks like p.kill() is not working). I'm getting the exception: "No process is associated with this object". I'm just looking for a function that helps me kill this process like task manager does.