mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-09 05:04:39 +02:00
Simpe rename
This commit is contained in:
19
Scripts/close-calculator.ps1
Executable file
19
Scripts/close-calculator.ps1
Executable file
@ -0,0 +1,19 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Closes the calculator application
|
||||
.DESCRIPTION
|
||||
This script closes the calculator application gracefully.
|
||||
.EXAMPLE
|
||||
PS> ./close-calculator
|
||||
.NOTES
|
||||
Author: Markus Fleschutz · License: CC0
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
#>
|
||||
|
||||
TaskKill /im Calculator.exe /f /t
|
||||
if ($lastExitCode -ne "0") {
|
||||
& "$PSScriptRoot/speak-english.ps1" "Sorry, no calculator application is running."
|
||||
exit 1
|
||||
}
|
||||
exit 0 # success
|
Reference in New Issue
Block a user