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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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