[VB.Net] [Snippet] Anti-unwanted Process 04-03-2011, 09:12 AM
#1
Code:
Dim AntiProcess() As String = {"notepad", "mspaint", "taskmgr"} 'etc
For intI As Integer = 0 To AntiProcess.GetUpperBound(0)
'Dim procFound As Integer = Process.GetProcessesByName(AntiProcess(intI)).Length
For Each x As Process In Process.GetProcessesByName(AntiProcess(intI))
x.CloseMainWindow() 'or x.Kill()
Next
'If procFound > 0 Then End
Next
This will send close message / end all the Process (even multiple instances) in the AntiProcess() if they are not locked or have some other cool security.
![[Image: rytwG00.png]](http://i.imgur.com/rytwG00.png)
Redcat Revolution!