Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • December 05, 2016, 02:32:24 AM
  • Proudly celebrating 10 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 26435 times)

zeemar

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 32
    • View Profile
    • Donate to Member
help.... need a tool/utility to auto terminate a process
« on: April 27, 2006, 10:04:24 AM »
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:57 AM by brotherS »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,406
    • 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:08 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:
http://www.donationc...proctamer/index.html

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,117
    • View Profile
    • Donate to Member
Re: help....need a tool/utility to Auto terminate a process
« Reply #2 on: April 27, 2006, 10:18:04 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:54 AM »
Thanks ...I will try those


brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,136
    • View Profile
    • Donate to Member
Re: help....need a tool/utility to Auto terminate a process
« Reply #4 on: April 27, 2006, 10:35:25 AM »
If you need to "only kill if ..." or something else more complicated take a look at AutoHotkey: http://www.donationc...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:01 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:10 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:02 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:10 AM »
If you'd like some more options, check skrommel's ProcessGuard.
http://www.donationc...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:14 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:32 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:55 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:21 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:08 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:37 PM by jgpaiva »

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,136
    • View Profile
    • Donate to Member
Re: help....need a tool/utility to Auto terminate a process
« Reply #12 on: April 27, 2006, 12:58:39 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,136
    • View Profile
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #13 on: April 27, 2006, 12:59:57 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:05 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,258
    • View Profile
    • Coding Snacks by Lanux128
    • Read more about this member.
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #15 on: April 27, 2006, 08:48:46 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:06 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:02 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:10 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:26 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:33 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,258
    • View Profile
    • Coding Snacks by Lanux128
    • Read more about this member.
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #21 on: May 03, 2006, 08:38:34 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: 630
    • View Profile
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #22 on: May 03, 2006, 09:59:01 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: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,258
    • View Profile
    • Coding Snacks by Lanux128
    • Read more about this member.
    • Donate to Member
Re: help.... need a tool/utility to auto terminate a process
« Reply #24 on: May 04, 2006, 08:38:00 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.

Quote from: this is where you change
...
;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
)

then you're good to go.