Improve the scripts

This commit is contained in:
Markus Fleschutz 2021-11-15 14:12:36 +01:00
parent 23d02c432e
commit 7649f8fe2f
11 changed files with 22 additions and 22 deletions

View File

@ -11,8 +11,8 @@
https://github.com/fleschutz/PowerShell
#>
$result = TaskKill /im Calculator.exe /f /t
if ($result -ne 0) {
TaskKill /im Calculator.exe /f /t
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close calculator"
exit 1
}

View File

@ -11,8 +11,8 @@
https://github.com/fleschutz/PowerShell
#>
$result = TaskKill /im GitExtensions.exe
if ($result -ne 0) {
TaskKill /im GitExtensions.exe
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close Git Extensions"
exit 1
}

View File

@ -11,8 +11,8 @@
https://github.com/fleschutz/PowerShell
#>
$result = TaskKill /im outlook.exe
if ($result -ne 0) {
TaskKill /im outlook.exe
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close Microsoft Outlook"
exit 1
}

View File

@ -11,8 +11,8 @@
https://github.com/fleschutz/PowerShell
#>
$result = TaskKill /im mspaint.exe
if ($result -ne 0) {
TaskKill /im mspaint.exe
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close Microsoft Paint"
exit 1
}

View File

@ -11,8 +11,8 @@
https://github.com/fleschutz/PowerShell
#>
$result = TaskKill /im WinStore.App.exe /f /t
if ($result -ne 0) {
TaskKill /im WinStore.App.exe /f /t
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close Microsoft Store"
exit 1
}

View File

@ -11,8 +11,8 @@
https://github.com/fleschutz/PowerShell
#>
$result = TaskKill /im thunderbird.exe
if ($result -ne 0) {
TaskKill /im thunderbird.exe
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close Mozilla Thunderbird"
exit 1
}

View File

@ -11,8 +11,8 @@
https://github.com/fleschutz/PowerShell
#>
$result = TaskKill /im obs64.exe
if ($result -ne 0) {
TaskKill /im obs64.exe
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close OBS Studio"
exit 1
}

View File

@ -11,8 +11,8 @@
https://github.com/fleschutz/PowerShell
#>
$result = TaskKill /f /im CalendarApp.Gui.Win10.exe
if ($result -ne 0) {
TaskKill /f /im CalendarApp.Gui.Win10.exe
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close OneCalendar"
exit 1
}

View File

@ -11,8 +11,8 @@
https://github.com/fleschutz/PowerShell
#>
$result = TaskKill /im PaintStudio.View.exe /f
if ($result -ne 0) {
TaskKill /im PaintStudio.View.exe /f
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close Paint 3D"
exit 1
}

View File

@ -11,8 +11,8 @@
https://github.com/fleschutz/PowerShell
#>
$result = TaskKill /im 3DViewer.exe /f
if ($result -ne 0) {
TaskKill /im 3DViewer.exe /f
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close 3D Viewer"
exit 1
}

View File

@ -11,8 +11,8 @@
https://github.com/fleschutz/PowerShell
#>
$result = TaskKill /im devenv.exe
if ($result -ne 0) {
TaskKill /im devenv.exe
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close Visual Studio"
exit 1
}