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

<< < (9/9)

Gerome:
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
-zeemar (May 03, 2006, 01:42 PM)
--- End quote ---

Here is a complete and GUI version of my process killer.
It works from Win95b up to Vista Beta 2 version :)

--- ---#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

jgpaiva:
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? ;)), 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!

nite_monkey:
YAY! ;D 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)

jgpaiva:
YAY! ;D 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)
-nite_monkey (April 04, 2007, 05:35 PM)
--- End quote ---
You're welcome!!

BTW.... How could i disable that? :D

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

Navigation

[0] Message Index

[*] Previous page

Go to full version