Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
using System.Diagnostics;
Process[] pp = Process.GetProcessesByName("Hier das Programm");
foreach (Process p in pp)
{
p.Kill();
}
Sofern der Process über ein Mainwindow (wie z.B. firefox) verfügt sollte man die Methode CloseMainWindow() verwenden.Data edited by the process or resources allocated to the process can be lost if you call Kill. Kill causes an abnormal process termination, and should be used only when necessary. CloseMainWindow enables an orderly termination of the process and closes all windows, so it is preferable for applications with an interface. If CloseMainWindow fails, you can use Kill to terminate the process. Kill is the only way to terminate processes that do not have graphical interfaces.
Process[] pp = Process.GetProcessesByName("taskmgr");
foreach (Process p in pp)
{
p.CloseMainWindow();// Normales ende
//p.Kill(); sofort beenden
}