Results 1 to 9 of 9

Thread: End Task all applications

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Posts
    124

    End Task all applications

    Hello.

    Can somebody share the code for ending the process of all open programs including explorers. Thanks.

  2. #2
    Hyperactive Member Capp's Avatar
    Join Date
    May 2005
    Location
    Texas
    Posts
    409

    Re: End Task all applications

    Quote Originally Posted by Erroneous
    Hello.

    Can somebody share the code for ending the process of all open programs including explorers. Thanks.
    You will not be able to kill all running processes on a Windows machine. The OS prevents you from killing critical services. You can kill explorer.exe, because its just a shell, but you can't terminate all programs.

    Its probably not 100% impossible, but doing so in normal mode would cause it to become so instable that nothing else would function.
    AmazingAntivirus.com
    Remote Data Backups


    Please Mark your Thread "Resolved", if the query is solved...

    If a post has helped you then Please Rate it!

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Posts
    124

    Re: End Task all applications

    I'm not including the system process. Only the opened applications like word, excel, internet explorer or explorers only or any other softwares. IS this possible with VB to detect them and end process all of them regardless of how many programs are opened?

  4. #4
    Hyperactive Member Capp's Avatar
    Join Date
    May 2005
    Location
    Texas
    Posts
    409

    Re: End Task all applications

    Quote Originally Posted by Erroneous
    I'm not including the system process. Only the opened applications like word, excel, internet explorer or explorers only or any other softwares. IS this possible with VB to detect them and end process all of them regardless of how many programs are opened?
    It is possible to do it with a loop, assuming you have rights to kill it. If you are running as Admin it is much easier than trying to pass the necessary credentials.

    The best option would be a loop.
    AmazingAntivirus.com
    Remote Data Backups


    Please Mark your Thread "Resolved", if the query is solved...

    If a post has helped you then Please Rate it!

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Posts
    124

    Re: End Task all applications

    I'm doing it with my personal computer. I have all the rights. OK do it in a loop. How would I know which one to close? Is there an API for this?

  6. #6
    Hyperactive Member Capp's Avatar
    Join Date
    May 2005
    Location
    Texas
    Posts
    409

    Re: End Task all applications

    Here is a good example on how to list and kill processes in VB:

    TheScarms

    I hope that helps
    AmazingAntivirus.com
    Remote Data Backups


    Please Mark your Thread "Resolved", if the query is solved...

    If a post has helped you then Please Rate it!

  7. #7
    Fanatic Member
    Join Date
    May 2005
    Posts
    528

    Re: End Task all applications

    yes i have seen programs that can act like task manager and can show you all of the processes and give you the option to end one. try searching the codebank or a source code website whoose name i dont think i am allowed to mention since it would be advertising

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Posts
    124

    Re: End Task all applications

    OK. I'll play with the TerminateProcess API for the moment. Thanks for replying. I have work with terminate process but I can only terminate one process by the application name. I can't find the logic to find every opened app then end their lives forever.

    Thanks for the link Capp. I see i need the use of SendMessage then fire WM_CLOSE to every one of them.

  9. #9
    Frenzied Member zynder's Avatar
    Join Date
    Nov 2006
    Location
    localhost
    Posts
    1,434

    Re: End Task all applications

    Try this link by Bushmobile. It closes all open explorer.

    http://www.vbforums.com/showpost.php...11&postcount=4

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