I have several scheduled tasks that each execute a (different) batch file. Each batch file calls into the same program, with with separate command line arguments. If I Stop a task while it's running, the program in the batch file still runs. (The batch file is a one-liner that simply executes the program.)
How can I force the program launched from a batch file to force quit when I Stop the task that calls the batch file?
As a work around, I'm look for the task in the running processes, and kill it by process id. I'd like a cleaner solution that's managed from the Task Scheduler.