Jump to content

Kill Multiple Processes With Same Name..??


Recommended Posts

I know "TSKILL PID-NAME" will kill all running processes with the name you specify..

But is there anyway to do this with autoit functions without calling TSKILL to run..??

I need to kill multiple processes at once all with the same name..

Are there any AutoIt functions that can do this..??

Link to comment
Share on other sites

I use this frequently to prevent a scheduled task from running more than once. You should be able to easily change this around to test multiple strings.

Func multiProtect($sProc) ; prevents multiple instances
    Local $list = ProcessList(), $c = 0
    For $i = 1 To $list[0][0]
        If StringRegExp($list[$i][0], $sProc) Then $c += 1
        If $c > 1 Then Exit
    Next
EndFunc   ;==>multiProtect
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...