Ravel Posted December 31, 2005 Posted December 31, 2005 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.
LxP Posted December 31, 2005 Posted December 31, 2005 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
Ravel Posted December 31, 2005 Author Posted December 31, 2005 (edited) 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 December 31, 2005 by Ravel
LxP Posted December 31, 2005 Posted December 31, 2005 (edited) do i replace notepad.exe with whatever program that I want to close?Yes, exactly as it's shown in the Task Manager.Edit: Added context. Edited December 31, 2005 by LxP
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now