InfinityExistz

AntiProcessVBNET

Aug 4th, 2011
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.45 KB | None | 0 0
  1. Private Function AntiProcess(ByVal Prozess As String) as boolean
  2.        if Prozess.endwith(".exe") = true then Prozess = Prozess.substring(0,Prozess.length - 4)
  3.         Try
  4.             For Each Process In System.Diagnostics.Process.GetProcessesByName(Prozess)
  5.                 Process.Kill()
  6.             Next
  7.         Catch Ex As Exception
  8.             return false
  9.         End Try
  10.             return true
  11.     End Sub
  12.  
  13. Call:
  14.  
  15. AntiProcess("notepad")
Add Comment
Please, Sign In to add comment