mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-23 14:18:38 +01:00
Improve close-program.ps1
This commit is contained in:
parent
b2e8acc282
commit
dcdd9a3e3d
@ -42,7 +42,7 @@ try {
|
||||
start-sleep -milliseconds 100
|
||||
stop-process -name $ProgramName -force -errorAction 'silentlycontinue'
|
||||
}
|
||||
write-host -foregroundColor green "✔️ closed $FullProgramName, found ($($Processes.Count) process(es)"
|
||||
"✔️ closed $FullProgramName, stopped $($Processes.Count) process(es)"
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user