topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 11:31 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: help.... need a tool/utility to auto terminate a process  (Read 46373 times)

zeemar

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 32
    • View Profile
    • Donate to Member
I am looking a for a freeware utility or a tool which will continuously monitor for a particular process/exe and when it finds it should kill it.

Does any body know or aware such a utility


Thanks
zeemar
« Last Edit: April 27, 2006, 10:38 AM by brotherS »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: help....need a tool/utility to Auto terminate a process
« Reply #1 on: April 27, 2006, 10:10 AM »
Actually, although it's not it's main function, ProcessTamer can be told to do this by adding an explicit KILL rule for the app:
https://www.donation...proctamer/index.html

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: help....need a tool/utility to Auto terminate a process
« Reply #2 on: April 27, 2006, 10:18 AM »

zeemar

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 32
    • View Profile
    • Donate to Member
Re: help....need a tool/utility to Auto terminate a process
« Reply #3 on: April 27, 2006, 10:29 AM »
Thanks ...I will try those


brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,260
    • View Profile
    • Donate to Member
Re: help....need a tool/utility to Auto terminate a process
« Reply #4 on: April 27, 2006, 10:35 AM »
If you need to "only kill if ..." or something else more complicated take a look at AutoHotkey: https://www.donation...h2;search=autohotkey

zeemar

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 32
    • View Profile
    • Donate to Member
Re: help....need a tool/utility to Auto terminate a process
« Reply #5 on: April 27, 2006, 10:39 AM »
I want to just KILL the process

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #6 on: April 27, 2006, 10:47 AM »
I see you're quite desperate.
Here's processkiller:
.exe version
.ahk version

When it is executed, it'll ask for the name of a process, and will kill it when it comes up.
If you pass it some argument, it'll use it as the name of the process to kill, and won't ask for anything.

[edit]it only works with one process per executable.but can be adapted if you have any need for more processes.[/edit]
« Last Edit: May 02, 2006, 04:34 PM by jgpaiva »

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #7 on: April 27, 2006, 10:49 AM »
If you'd like some more options, check skrommel's ProcessGuard.
https://www.donation...rommel/#ProcessGuard

zeemar

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 32
    • View Profile
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #8 on: April 27, 2006, 12:08 PM »
Thankyou jpaigva, ProcessKiller is exactly what I am looking for.

Also thanks to skrommel for writing such a utility.



Is there any way, i can use the ProcessKiller for morethan one process. Because in my system there are 4 EXEs which are not needed to run but are always running. I cannot/shouldnot uninstall them.

Curretnly all i can see in one processkiller instance can be used to kill one process only.

Any suggestions ?

Thanks
zeemar


zeemar

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 32
    • View Profile
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #9 on: April 27, 2006, 12:10 PM »
I am sorry, I think ProcessKiller is not from skrommel

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #10 on: April 27, 2006, 12:21 PM »
:) zeemar
Nope, i did process killer. But skrommel did a quite useful app that i only remember existed after making processkiller.
You can get the new version from:
.exe version
.ahk version

The new version accepts more than one process name. You can input it like this:
on the inputbox: processone.exe,processtwo.exe,processthree.exe
by running with parameters: processkiller.exe processone.exe processtwo.exe processthree.exe
« Last Edit: May 02, 2006, 04:34 PM by jgpaiva »

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #11 on: April 27, 2006, 12:50 PM »
This last version had a bug (sorry!) and the "pass by parameter" mode wasn't working correctly. I've fixed it, though.
Please redownload:
.exe version
.ahk version
« Last Edit: May 02, 2006, 04:34 PM by jgpaiva »

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,260
    • View Profile
    • Donate to Member
Re: help....need a tool/utility to Auto terminate a process
« Reply #12 on: April 27, 2006, 12:58 PM »
I want to just KILL the process
There's no such thing as "just killing" something ;)

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,260
    • View Profile
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #13 on: April 27, 2006, 12:59 PM »
Is there any way, i can use the ProcessKiller for morethan one process. Because in my system there are 4 EXEs which are not needed to run but are always running. I cannot/shouldnot uninstall them.
Did you try to prevent them from being executed at startup with a tool like Autoruns? http://www.sysintern...lities/Autoruns.html is very helpful if you use it carefully (don't know how experienced you are).

zeemar

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 32
    • View Profile
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #14 on: April 27, 2006, 02:32 PM »
Thanks jpaigva, i will try this new version of ProcessKiller.

To brotherS,

I do have AutoRuns on my system and i don't have these processes in the AutoRuns list. But periodically these processes kick-off


lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #15 on: April 27, 2006, 08:48 PM »
Because in my system there are 4 EXEs which are not needed to run but are always running. I cannot/shouldnot uninstall them.

you seem to have a spyware problem. are those processes can't be uninstalled because they keep installing themselves or they shouldn't be uninstalled because the pc is not yours or something like that? imo, it's better to attack the root cause rather than patching up.

kimmchii

  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 360
    • View Profile
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #16 on: April 27, 2006, 08:55 PM »
agree with lanux128, what are the name of these processes?
If you find a good solution and become attached to it, the solution may become your next problem.
~Robert Anthony

zeemar

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 32
    • View Profile
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #17 on: May 02, 2006, 02:26 PM »
Actually those processes are not spyware. They are Antivirus related software and my company installed those on my system and I should always have them. Even if i disable the services, they are restarted by the network Admin.

I wanted to kill them because they eat up all the memory and CPU while actively running.

On the other hand there is one other process from Real player installation which adds it self to the Auto start items.


Finally, jpaigva, i was not able to kill these processes using your ProcessKiller. Looks like the processkiller finds them but when it tries to kill them the CPU usage shows 100% and neither processkiller nor the antivirus process go away.

Thanks

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #18 on: May 02, 2006, 02:55 PM »
Zeemar: but did the first version work?

Gerome

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 154
    • View Profile
    • Get my Freestyle Basic Script Language + compiler!
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #19 on: May 02, 2006, 05:09 PM »
Hello,

A pure process killer that you can use from a batch file once the source compiled as a standalone executable :)
#Option Explicit
#AppType CONSOLE

#DllDeclare Kernel32( "CloseHandle", "OpenProcess", "TerminateProcess" )
#DllDeclare User32( "FindWindow", "GetWindowThreadProcessId" )

Print Kill( "Notepad", Null )
Print Kill( "XLMAIN", Null )
Pause

Function Kill( byVal szClass, byval szCaption ) As Integer
Dim %pid = 0, %hWnd = 0, %hProc = 0, %PROCESS_TERMINATE = 1
    hwnd = FindWindow( szClass, szCaption )
    If hwnd = 0 Then Return False
    GetWindowThreadProcessId( hWnd, @pid )
    If pid = 0 Then Return False
    hProc = OpenProcess( PROCESS_TERMINATE, False, pid )
    If hProc Then
        TerminateProcess( hProc, 0 )
        CloseHandle( hProc )
        Return True
    End If
    Return False
End Function
Yours,
(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
http://www.fbsl.net [FBSL Author]
http://gedd123.free.fr/FBSLv3.zip [FBSL Help file]
(¯`·._.·[If you need help... just ask]·._.·´¯)

zeemar

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 32
    • View Profile
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #20 on: May 03, 2006, 01:42 PM »
Jpaigva,

The first one didn't work either.


Gerome,

I am currently using the batch file which has the following line ...

taskkill /F /T /IM InoRpc.exe

This works fine, but i wanted to avoid manually clicking. If possible I want to have a program which monitors for these processses and issues this type of command to kill them.

Thanks

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #21 on: May 03, 2006, 08:38 PM »
Actually those processes are not spyware. They are Antivirus related software and my company installed those on my system and I should always have them. Even if i disable the services, they are restarted by the network Admin.

Zeemar:
since you haven't resolved your problem yet, you might want to try a script that i've using. but this script requires  PsKill from Sysinternals. feel free to adapt it to your needs.

Here is the 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...

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

;declare all unwanted processes
;just processes' name will do
ToClose =
( Join|
AllChars
CLCL
avgamsvr
avgcc
avgupsvc
)
;MsgBox %ToClose% ;test var

;Close AllChars, CLCL, AVGamsvr, AVGcc, AVGupsvc
Loop, Parse, ToClose, |
{
  ;MsgBox, Process #: %A_Index% is %A_LoopField%. ;test var
  Process, Exist, %A_LoopField%.exe
  NewPID = %ErrorLevel%   ; Save the value since ErrorLevel often changes.
  If NewPID <> 0          ;
    {
    ;MsgBox Process %A_LoopField%.exe is found, with the process ID of %NewPID%. ;test var
    Run, %ProgramFiles%\SysTools\pskill.exe %NewPID%
    }
}
Return


Rover

  • Master of Smilies
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 632
    • View Profile
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #22 on: May 03, 2006, 09:59 PM »
I can't believe no one mentioned these two from sysinternals.com:

http://www.sysinternals.com/Utilities/PsKill.html PsKill for command line killing

and for a gui presentation of running processes try:

http://www.sysinternals.com/Utilities/ProcessExplorer.html Process Explorer.  Can kill a single process or an entire process tree!  Just like killing the family of the rat, not just the rat himself  ;)

Insert Brilliant Sig line here

zeemar

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 32
    • View Profile
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #23 on: May 04, 2006, 03:12 PM »
Thanks Lanux for the code.

How do I use this code.... I mean how can i convert this code into an EXE file.



Thanks

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #24 on: May 04, 2006, 08:38 PM »
How do I use this code.... I mean how can i convert this code into an EXE file.
i assumed you had autohotkey installed in your pc but if you haven't, use ahk2exe to convert the script to an EXE file.

to use the script itself, first find out the names of processes that is bothering you via Windows' Task Manager or as mentioned by Rover, Sysinternal's Process Explorer. next you can edit the script to add those processes, replacing the processes already in the script.

...
;declare all unwanted processes
;just processes' name will do
ToClose =
( Join|
AllChars     ; your process goes here
CLCL         ; your process goes here
avgamsvr   ; your process goes here
avgcc       ; your process goes here
avgupsvc   ; your process goes here
)
-this is where you change

then you're good to go.