Results 1 to 4 of 4

Thread: This an example for getting a list of running process and kill any one of them.

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2004
    Posts
    41

    This an example for getting a list of running process and kill any one of them.

    This an example for getting a list of running process and kill any one of them.

    Example With VB5

    Tested under Windows XP




    AmjadTW
    Attached Files Attached Files

  2. #2
    Frenzied Member
    Join Date
    May 2003
    Location
    So Cal
    Posts
    1,564

  3. #3
    Lively Member
    Join Date
    Dec 2005
    Posts
    76

    Re: This an example for getting a list of running process and kill any one of them.

    Can some one help me with this line please?
    Prog = OpenProcess(PROCESS_TERMINATE, 0, CLng(List1.ItemData(List1.ListIndex)))
    I want it to delete a specific proccess without have to highlight it how do i do it?
    I want to delete msnmsgr.exe if the list without have to press on the list what do i change in this line?

  4. #4

    Thread Starter
    Member
    Join Date
    Jun 2004
    Posts
    41

    Re: This an example for getting a list of running process and kill any one of them.

    do this:

    for i = 0 to list1.listcount
    if list1.list(i)="msnmsgr.exe " then

    Dim Prog As Long
    Prog = OpenProcess(PROCESS_TERMINATE, 0, CLng(List1.ItemData(List1.ListIndex)))
    If Prog Then
    TerminateProcess Prog, 0
    CloseHandle Prog
    Else
    MsgBox "You can't Kill This Process, Maybe because it's important for System"
    End If
    DoEvents
    FillList

    end if
    next

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width