Welcome Guest.   Make a donation to an author on the site September 02, 2014, 01:57:15 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2013! Download dozens of custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: Prev 1 [2]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: help.... need a tool/utility to auto terminate a process  (Read 20931 times)
zeemar
Participant
*
Posts: 32

View Profile Give some DonationCredits to this forum member
« Reply #25 on: May 05, 2006, 09:27:37 AM »

Hi Lanux

I Installed AutoHotKey now

is this the right way ...

...
;declare all unwanted processes
;just processes' name will do
ToClose =
( Join|
AllChars     ; InoRT.exe
CLCL         ; InoTask.exe
avgamsvr   ; xyz.exe
avgcc       ; your process goes here
avgupsvc   ; your process goes here
)

Thanks for your help Lanux
Logged
jgpaiva
Global Moderator
*****
Posts: 4,710



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #26 on: May 05, 2006, 09:31:54 AM »

Hi Lanux

I Installed AutoHotKey now

is this the right way ...

...
;declare all unwanted processes
;just processes' name will do
ToClose =
( Join|
AllChars     ; InoRT.exe
CLCL         ; InoTask.exe
avgamsvr   ; xyz.exe
avgcc       ; your process goes here
avgupsvc   ; your process goes here
)

Thanks for your help Lanux
I think Lanux meant something like this:

[copy or print]
;declare all unwanted processes
;just processes' name will do
ToClose =
( Join|
InoRT 
InoTask   
xyz.exe 
)
Everything that comes after ';' is a comment, so, it's ignored.
Don't forget you'll still need pskill Wink
Logged

zeemar
Participant
*
Posts: 32

View Profile Give some DonationCredits to this forum member
« Reply #27 on: May 05, 2006, 10:06:23 AM »

Thanks Jpaigva for the clarification.

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.


Thanks
Logged
jgpaiva
Global Moderator
*****
Posts: 4,710



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #28 on: May 05, 2006, 10:21:24 AM »

zeemar: Do you have pskill (http://www.sysinternals.com/Utilities/PsKill.html) in the same directory as that script?
Logged

zeemar
Participant
*
Posts: 32

View Profile Give some DonationCredits to this forum member
« Reply #29 on: May 05, 2006, 10:27:21 AM »

Yes i have pskill.exe in the same directory as i had in the script.

Thanks
Logged
jgpaiva
Global Moderator
*****
Posts: 4,710



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #30 on: May 05, 2006, 10:55:57 AM »

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?
Logged

lanux128
Global Moderator
*****
Posts: 6,088



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #31 on: May 07, 2006, 07:50:08 PM »

...
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:
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...
Logged

zeemar
Participant
*
Posts: 32

View Profile Give some DonationCredits to this forum member
« Reply #32 on: May 08, 2006, 08:50:16 AM »

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
Logged
noth(a)nk.you
Charter Member
***
Posts: 78


More than meets the eye.

View Profile Give some DonationCredits to this forum member
« Reply #33 on: May 08, 2006, 09:30:17 AM »

Is AHK code extensible to allow for the path name of processes?  (Some are uppity enough to take names like "setup.exe.")
Logged
lanux128
Global Moderator
*****
Posts: 6,088



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #34 on: May 08, 2006, 10:30:33 PM »

- 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
glad to see it was of use to you, zeemar.. smiley
as for the 1st request, SetTimer function can do the trick. modify the code as below, the newly-added lines are in blue:

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

zeemar
Participant
*
Posts: 32

View Profile Give some DonationCredits to this forum member
« Reply #35 on: May 09, 2006, 09:33:34 AM »

Thank you Lanux
Logged
lanux128
Global Moderator
*****
Posts: 6,088



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #36 on: May 09, 2006, 09:16:14 PM »

zeemar,
instead of throwing in a input-box, i've decided to add an INI file for any modification. now the script should repeat itself and allow you to edit the list externally.

ok, here you go... thumbs up
Logged

zeemar
Participant
*
Posts: 32

View Profile Give some DonationCredits to this forum member
« Reply #37 on: May 11, 2006, 08:30:53 AM »

Thank you lanux, for all your help.

It is working great.
Logged
lanux128
Global Moderator
*****
Posts: 6,088



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #38 on: May 14, 2006, 04:59:23 AM »

Thank you lanux, for all your help.

It is working great.
u're welcome... Grin
Logged

SexyLilDarkPaw
Participant
*
Posts: 28

View Profile Give some DonationCredits to this forum member
« Reply #39 on: May 26, 2006, 09:18:55 PM »

Hi all, Wonderful suggestions,

Quick question for jgpaiva though, Is there a maximum number of processes that can be killed at once? (or a text limiter to the commandline?) or can i just copy a huge list of exe's into it for example

exe1,exe2,3,4,....20

Thanks in advance XD, Definitely one to add to my software collection :-p

ttyl
      Felicia
Logged
Gerome
Charter Honorary Member
***
Posts: 154


View Profile WWW Give some DonationCredits to this forum member
« Reply #40 on: May 27, 2006, 01:11:41 AM »

Hello,

Gerome,

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

Here is a complete and GUI version of my process killer.
It works from Win95b up to Vista Beta 2 version smiley
[copy or print]
#Option Explicit
#DllDeclare Kernel32( "CloseHandle", "OpenProcess", "TerminateProcess" )
#DllDeclare User32( "FindWindow", "GetWindowThreadProcessId" )

Const NBSECTOWAITBEFORE = 10

Sub Cleaner()
  Fbsl_settext( hLabel, " > Killer @" & Time(1) & ":" & Time(2) & ":" & Time(3) & " <" )
  '// Put your program list here: its class name or its caption
  Kill( "Notepad", Null )
  Kill( "XLMAIN", Null )
End Sub

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

Dim %hLabel = FBSL_Control (_
            "static", Me, "zzzz", 1000, 20, 20, 170, 20,_
            WS_CHILD + SS_LEFT + WS_VISIBLE, WS_EX_TRANSPARENT )
FBSL_SetFont(hLabel, "Arial", 12, FW_BOLD, 0 ,0 ,0)
Fbsl_SetFormColor( Me, RGB(128,0,0) )

Cleaner()
SetTimer( Me, 1000, NBSECTOWAITBEFORE * 1000 )

Resize( Me, 0, 0, 220, 90 )
Fbsl_settext( Me, "Process killer" )
Center(Me)
Show(Me)

Begin Events
    Select Case cbmsg
      Case wm_timer
    Cleaner()
      Case wm_close
        Killtimer(Me, 1000)
        Exitprogram(-1)
    End Select
End Events
Logged

Yours,
(¯`·._.FBSL Help file]
(¯`·._.
jgpaiva
Global Moderator
*****
Posts: 4,710



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #41 on: May 27, 2006, 04:15:06 AM »

Hi Felicia!
Does ProcessKiller work for you? It strange it didn't work for zeemar.
No, no problem, if you don't go over the 4mb of text (which would take like..hum...20k words? Wink), no problem. At least, it shouldn't.
Oh, and to use a big list, maybe you should think about using the command line parameters, so that you don't have to paste the whole line everytime you run it. (just remember that for the commandline parameters, the names of the processes are separated by spaces, and not commas.)
bye!
Logged

nite_monkey
Member
**
Posts: 689


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #42 on: April 04, 2007, 05:35:11 PM »

YAY! Grin Thank you jgpaiva processkiller is the best single file program I have downloaded, Now the annoying windows update please restart box won't keep popping up on me. (Yes I could disable it, but I am too lazy to do that, and I may want it back later, I dunno)
Logged

[Insert really cool signature here]
jgpaiva
Global Moderator
*****
Posts: 4,710



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #43 on: April 04, 2007, 07:04:52 PM »

YAY! Grin Thank you jgpaiva processkiller is the best single file program I have downloaded, Now the annoying windows update please restart box won't keep popping up on me. (Yes I could disable it, but I am too lazy to do that, and I may want it back later, I dunno)
You're welcome!!

BTW.... How could i disable that? cheesy
Logged

nite_monkey
Member
**
Posts: 689


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #44 on: April 04, 2007, 09:16:18 PM »

you disable it from the computers group policies. goto this page, it has a registry way to disable it, and it also have the group policies way to disable it.
Logged

[Insert really cool signature here]
Pages: Prev 1 [2]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.059s | Server load: 0.14 ]