SuckOnMyProness
save pid to file when starting, kill pid when restarting
something like this should work for saving the pid
powershell -Command "(Start-Process whatever.exe -passthru).ID | Out-File -FilePath pid.txt"
make sure to give the pid file a unique name for every instance you have running and when restarting read the pid from the file to kill the process.