|
-
Mar 29th, 2007, 12:56 AM
#1
Thread Starter
Lively Member
End Task all applications
Hello.
Can somebody share the code for ending the process of all open programs including explorers. Thanks.
-
Mar 29th, 2007, 01:01 AM
#2
Hyperactive Member
Re: End Task all applications
 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.
-
Mar 29th, 2007, 01:03 AM
#3
Thread Starter
Lively Member
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?
-
Mar 29th, 2007, 01:10 AM
#4
Hyperactive Member
Re: End Task all applications
 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.
-
Mar 29th, 2007, 01:13 AM
#5
Thread Starter
Lively Member
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?
-
Mar 29th, 2007, 01:19 AM
#6
Hyperactive Member
Re: End Task all applications
Here is a good example on how to list and kill processes in VB:
TheScarms
I hope that helps
-
Mar 29th, 2007, 01:22 AM
#7
Fanatic Member
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
-
Mar 29th, 2007, 01:22 AM
#8
Thread Starter
Lively Member
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.
-
Mar 29th, 2007, 01:47 AM
#9
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|