Jump to content

Ending a program in task manager


Ravel
 Share

Recommended Posts

I have a quick question do you guys know if there is a generic code (script) for ending a task in task manager? I am trying to set up a script to end an instance of a program that is in task manager. Also is there a way to have it set up to end all of the instances if there are multiple instances? I appreciate any advice that you guys have. Thanks.

D.

Link to comment
Share on other sites

ProcessClose() is what you want:

ProcessClose('notepad.exe')

To kill multiple processes of the same name:

Local $List = ProcessList('notepad.exe')
For $I = 1 To $List[0][0]
    ProcessClose($List[$I][1])
Next
Link to comment
Share on other sites

ProcessClose() is what you want:

ProcessClose('notepad.exe')

To kill multiple processes of the same name:

Local $List = ProcessList('notepad.exe')
For $I = 1 To $List[0][0]
    ProcessClose($List[$I][1])
Next
*EDIT* Grrr.. i think i got what you meant... Thats what i get for skimming...lol9 Edited by Ravel
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...