On windows you can detect if a program is running given a PID using the command `sprintf('tasklist /FI "PID eq %d"', $pid)` and check the exitcode