Completing the process using C # dll. I wanted to create a dll, which would complete the processes, but it did not work out.
public static string notepad() { Process process = Process.Start("notepad.exe"); process.Kill(); }
What's wrong?
string killNameProcess = "notepad"; Process[] processes = Process.GetProcessesByName(killNameProcess); processes.First().Kill();
Process[] proc = Process.GetProcesses(); foreach (Process process in proc) if (process.ProcessName == "notepad") process.Kill();
Source: https://ru.stackoverflow.com/questions/164798/
All Articles
Process.Start
returns too quickly, without waiting for all internal structures to initialize). - ߊߚߤߘ