Well, you can definitely determine which programs are running by looking for the process names you need (GetProcessesByName ()) and killing them.
Process[] processes = Process.GetProcessesByName(processName); foreach(Process process in processes) { process.Kill(); }
You can only have a list of them that you do not want to run, perform a time check (or any criteria that must be met), and then go through the list. I did something like this once for the test, and it works quite well.
source share