I run a PowerShell script from another software, that script itself runs an executable
but under windows, that executable is not nested (child of) to the parent process if PowerShell context is killed, that executable is still running
how can I od my script to have the process killed as I kill PowerShell ?
try {
$Process = Start-Process -FilePath "someprogram.exe" -ArgumentList "--config","config_llvm13.yaml" -PassThru
Wait-Process $Process.Id
}
finally {
Stop-Process $Process.Id
}
thanks for your help