9 lines
199 B
PowerShell
9 lines
199 B
PowerShell
if (Test-Path ./pid.temp) {
|
|
$sID = Get-Item -Path ./pid.temp | Get-Content -Tail 1
|
|
if (Get-Process -Id $sID -ErrorAction SilentlyContinue) {
|
|
Stop-Process -Id $sID
|
|
}
|
|
Remove-Item "./pid.temp"
|
|
}
|
|
|