Well, it will be a bit hard to explain what i need to do here, but it goes like this:
I am building a program that will need to run .exe (From different folders).
How can i do this, that i will be able to do Process.start(), but i will be able to kill it as well?
I mean, if I do:
System.Diagnostics.Process process;
process = process.start();
Then I can do Process.Kill(); but what if I dont know how many processes I have? How can I do more and more processes with the ability to kill them?
Is this even possible?
I am hoping i explained it correctly. I am not sure how I can explain it better :O
You can store the created processes in a list to track them. Remove them from the list when you kill them:
You can also use other specialized collections (like a queue) if that makes more sense.