Running processes
BlitzMax Forums/BlitzMax Beginners Area/Running processes
| ||
Hi, Is there a way to read wich processes are running, and is it posible to shut one down? Thx |
| ||
Bummer, no reply. What i want to do is kill a running process, remove some registry keys and delete some files. I can edit the registry and i can delete files, but i don't know how to kill a running process. I can't seem to find any info on this miself, so i realy need a pointer in to the right direction. |
| ||
Kill processes is done through the WinAPI on Windows or through the kill command on unix based. But in most cases this stuff won't work because the app will need to have the rights to do that and any semi intelligent user won't give it the right to interfer with other threads and processes (I even ensure that on windows, including a registry firewall against morrons playing with my registry without my ok) |
| ||
Yes you can do this easily with the Windows API - basically you Enumerate through the processes and query the process for details like Window Name etc.. When you find the one you want then you can Terminate the process. This will all be invisibile to the OS Firewall, unless they Hook the Enumeration Functions, which I doubt. You don't need any special rights to do this. PS. Google is your friend. http://support.microsoft.com/kb/175030/EN-US/ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/terminateprocess.asp |
| ||
Than you for the info, i know allott more now. I found a bmax example that enumerates through the processes and outputs the processes id. What i need is the process name, there are api functions to do that but i can't get them to work. Is there any code needed in a module before api functions work or can i just call them from mi code using Extern? |
| ||
@Indiepath, thanks for the info, I've been wondering how to go about this very thing to... Regards |