From 7cf1d9c599cba4fb164c627d709695c271c33773 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Wed, 26 Jul 2023 13:44:05 +0200 Subject: [PATCH] Add a step for setting up software with app associations --- scripts/Windows/OS/Install.ps1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index a508868c..06df6afa 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -17,8 +17,6 @@ function Invoke-WindowsInstallation([Context] $context) . "$configPath/Explorer/Install.ps1" $context; . "$configPath/OpenSSH/Install.ps1" $context; . "$configPath/chocolatey/Install.ps1"; - . "$softwarePath/WinSCP/Install.ps1" $context; - . "$softwarePath/Thunderbird/Install.ps1" $context; $context.RemoveDesktopIcon("*Microsoft Edge*"); $context.Set("InitialConfiguration", 1, "DWord"); @@ -57,6 +55,13 @@ function Invoke-WindowsInstallation([Context] $context) exit; } + if (-not $context.Get("AppAssociations")) { + Write-Host "Setting up software with default app associations"; + . "$softwarePath/WinSCP/Install.ps1" $context; + . "$softwarePath/Thunderbird/Install.ps1" $context; + $context.Set("AppAssociations", 1, "DWord"); + } + New-PersonalUser $context; Restore-WindowsInstallation $context; }