Scenario: Let's assume I have a script that spawns a few processes. There may be times when the script has to be aborted. Most times this is fine. However, sometimes one or two of the spawned processes remain running, and are orphaned, because the script has been killed.
Is there any way to find the processes based on their environment (specific environment strings and values set when the script ran/spawned them), and kill them?
OS: Windows 7