On Linux, we have a module called
Proc::KillFam which will kill the shell and all its children, so we don't need to get the actual pid of the exe. I googled for
Proc::KillFam win32 and came up with some solutions where you can do it on Windows.
How do I kill a process tree in Windows and
Install Proc::ProcessTable on windows by ppm for example.