diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index 5bff9fdc..02f04ed3 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -186,6 +186,7 @@ $null = New-Module { if (Test-Collection "common") { # Common Software . "$softwarePath/WinSCP/Manage.ps1" @arguments; + . "$softwarePath/Thunderbird/Manage.ps1" @arguments; } }; } diff --git a/scripts/Windows/Software/Thunderbird/Manage.ps1 b/scripts/Windows/Software/Thunderbird/Manage.ps1 new file mode 100644 index 00000000..221bb9f3 --- /dev/null +++ b/scripts/Windows/Software/Thunderbird/Manage.ps1 @@ -0,0 +1,25 @@ +using namespace Microsoft.Win32; + +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../Scripts/AppAssociations.ps1"; +. "$PSScriptRoot/../../Scripts/Software.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + param( + [scriptblock] $Installer + ) + + Install-ChocoPackage thunderbird -ArgumentList "--params",'"/NoTaskbarShortcut /NoDesktopShortcut"' + & $Installer -Action ([InstallerAction]::Configure) + } ` + -Configurator { + Write-Host "Making Thunderbird the default mail program…"; + $applicationName = "Thunderbird"; + Set-DefaultAppAssociation -Identifier "mailto" -ProgId "Thunderbird.Url.mailto" -ApplicationName $applicationName; + Set-DefaultAppAssociation -Identifier ".eml" -ProgId "ThunderbirdEml" -ApplicationName $applicationName; + };