2023-10-31 12:48:22 +01:00
|
|
|
|
<#
|
2021-11-06 11:52:58 +01:00
|
|
|
|
.SYNOPSIS
|
2021-11-21 12:21:34 +01:00
|
|
|
|
Launches the Thunderbird app
|
2021-11-06 11:52:58 +01:00
|
|
|
|
.DESCRIPTION
|
2021-11-21 12:21:34 +01:00
|
|
|
|
This script launches the Mozilla Thunderbird email application.
|
2021-11-06 11:52:58 +01:00
|
|
|
|
.EXAMPLE
|
2021-11-29 10:44:26 +01:00
|
|
|
|
PS> ./open-thunderbird
|
2021-11-06 11:52:58 +01:00
|
|
|
|
.LINK
|
|
|
|
|
https://github.com/fleschutz/PowerShell
|
2022-09-06 21:42:04 +02:00
|
|
|
|
.NOTES
|
|
|
|
|
Author: Markus Fleschutz | License: CC0
|
2021-11-06 11:52:58 +01:00
|
|
|
|
#>
|
|
|
|
|
|
2021-12-13 08:55:50 +01:00
|
|
|
|
function TryToExec { param($Folder, $Binary)
|
|
|
|
|
if (test-path "$Folder/$Binary" -pathType leaf) {
|
|
|
|
|
start-process "$Folder/$Binary" -WorkingDirectory "$Folder"
|
|
|
|
|
exit 0 # success
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
TryToExec "C:\Program Files (x86)\Mozilla Thunderbird" "thunderbird.exe"
|
|
|
|
|
throw "It seems Thunderbird isn't installed yet."
|
|
|
|
|
} catch {
|
2022-11-18 16:54:04 +01:00
|
|
|
|
& "$PSScriptRoot/speak-english.ps1" "Sorry: $($Error[0])"
|
2021-12-13 08:55:50 +01:00
|
|
|
|
}
|