none
stop process RRS feed

All replies

  • For example, to kill Notepad, one of the methods =>

    Process[] procs = Process.GetProcessesByName("notepad");
    foreach (Process proc in procs)
    {
        proc.Kill();
    }

    Sunday, May 20, 2018 12:40 PM
  • Is the process you want to stop a program you wrote or is it a program someone else wrote?

    Note that use of Process.Kill Method (System.Diagnostics) is not recommended by Microsoft unless other solutions do not work.



    Sam Hobbs
    SimpleSamples.Info

    Sunday, May 20, 2018 2:52 PM
  • Hi, I used System.Diagnostics but Proces.Kill method doesn't work.
    Monday, May 21, 2018 12:48 PM
  • Hi, I used System.Diagnostics but Proces.Kill method doesn't work.

    "doesn't work" doesn't help...

    Is there an error code ?

    With which process ?

    Show your code...

    Monday, May 21, 2018 1:13 PM
  • I agree with Sam Hobbs.

    Why do you need to kill another process in a manner that does not give it a chance to gracefully end?  What problem are you trying to solve?

    Often, there is a better solution to the underlying problem than killing a process.

    Monday, May 21, 2018 1:40 PM