recrownedgtk/RecrownedGTK.Tools/end_process.ps1

9 lines
199 B
PowerShell
Raw Permalink Normal View History

2020-05-18 21:44:25 +00:00
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"
}