Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple process kill
#1
Hello guys,

With this code you can simply kill a process:
Quote:For Each p As Process In System.Diagnostics.Process.GetProcessesByName("notepad")
Try
p.Kill()
p.WaitForExit()
Catch winException As System.ComponentModel.Win32Exception
Catch invalidException As InvalidOperationException
End Try
Next

If the code you see "notepad"edit this part with the process name of your program.

Best regards,
Strafeness
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Source] List Process'/Kill Process ♱ RedTube ♱ 3 1,569 11-25-2012, 10:39 PM
Last Post: ƃu∀ ıʞƃu∀
  [VB.Net] Local/Remote TCP info from process [Source] The-One 5 3,876 08-11-2012, 05:18 PM
Last Post: Kenneth
  [Project] Write To Another Process' Memory Block AceInfinity 5 2,477 03-31-2012, 04:05 AM
Last Post: AceInfinity
  Process Detective (32 & 64 bit binaries) AceInfinity 3 1,502 03-23-2012, 12:09 PM
Last Post: AceInfinity
  Kill A Process [C#] wchar_t 15 5,194 11-16-2011, 06:27 AM
Last Post: TalishHF

Forum Jump:


Users browsing this thread: 1 Guest(s)