ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

help.... need a tool/utility to auto terminate a process

<< < (7/9) > >>

jgpaiva:
All looks in order, zeemar. It should kill the processes.
My processkiller didn't work too, but it works on my computer. That's very strange.
Anyone has any other opinion on this?

lanux128:
...
I created a EXE using ahk2exe but when i run it nothing happens.

Could somebody check this code and tell me if some thing is wrong.-zeemar (May 05, 2006, 10:06 AM)
--- End quote ---

zeemar:
actually, you need to specify like this:
;declare all unwanted processes
;just processes' name will do
ToClose =
( Join|
InoRT
jusched
InoTask
)

without the .exe because in the line below, each of the processes is added with .exe (of course, this is not good for portability but then i hadn't checked it thoroughly)
  Process, Exist, %A_LoopField%.exe

sorry for the confusion...
btw, jgpaiva tks for standing-in...

zeemar:
Thanks Lanux,

After making that change the script worked great.

Can it be further customized ?

- To monitor the processes every 15 mins or so and kill them.
- To have an input dialog which takes in the list of processes, like the processKiller created by jpaigva

Currrently when I run the EXE generated from the script ...it kills the processes if they are running but when the processes are restarted ...i have to manually run the EXE again.

Thanks for all your help

noth(a)nk.you:
Is AHK code extensible to allow for the path name of processes?  (Some are uppity enough to take names like "setup.exe.")

lanux128:
- To monitor the processes every 15 mins or so and kill them.
- To have an input dialog which takes in the list of processes, like the processKiller created by jpaigva
-zeemar (May 08, 2006, 08:50 AM)
--- End quote ---
glad to see it was of use to you, zeemar.. :)
as for the 1st request, SetTimer function can do the trick. modify the code as below, the newly-added lines are in blue:
the modified code; To kill some tasks prior to running any CPU-intensive apps
; Date: 18/03/2006
; Modified from its original version due to a request in DC forums
; Refer: hxxp://www.donationcoder.com/forum/index.php?topic=3413.0
; Adjust path to PsKill as necessary...
; Added SetTimer

#SingleInstance ignore
#NoTrayIcon
#Persistent
DetectHiddenWindows On
SetTitleMatchMode 2   ; not sure if needed but just in case.

SetTimer, CloseAll, 250
Return

CloseAll:
;declare all unwanted processes
;just processes' name will do
ToClose =
( Join|
InoRT
jusched
InoTask
)

;Close processes
Loop, Parse, ToClose, |
{
  Process, Exist, %A_LoopField%.exe
  NewPID = %ErrorLevel%   ; Save the value since ErrorLevel often changes.
  If NewPID <> 0          ;
    {
    Run, %ProgramFiles%\SysTools\pskill.exe %NewPID%
    }
}
Return

as for the 2nd request, i'll take a look at jgpaiva's script & then work-out something.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version