From a854c46094b0eca64e6431f9427270f2379e1fc6 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Tue, 22 Oct 2024 01:22:39 +0200 Subject: [PATCH] Install user-scoped project properly --- scripts/Windows/Scripts/Deployment.ps1 | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/scripts/Windows/Scripts/Deployment.ps1 b/scripts/Windows/Scripts/Deployment.ps1 index b55ba51a..89fddf01 100644 --- a/scripts/Windows/Scripts/Deployment.ps1 +++ b/scripts/Windows/Scripts/Deployment.ps1 @@ -17,6 +17,7 @@ function Deploy-SoftwareAction { ) [bool] $install = $false; + [bool] $userInstall = $Action -eq ([InstallerAction]::ConfigureUser); $arguments = [hashtable]@{ }; if ($null -ne $Action) { @@ -138,7 +139,7 @@ function Deploy-SoftwareAction { } } - if ($Action -eq ([InstallerAction]::ConfigureUser)) { + if ($userInstall) { if (Test-Program "pennywise") { Install-WingetPackage kamranahmedse.pennywise; Remove-DesktopIcon "Pennywise*"; @@ -204,15 +205,17 @@ function Deploy-SoftwareAction { if ($collections.socialMedia) { if ($install) { - Install-ChocoPackage ` - signal ` - threema-desktop ` - element-desktop ` - teamspeak ` + Install-ChocoPackage teamspeak; + Remove-DesktopIcon "*TeamSpeak*"; + } + elseif ($userInstall) { + Install-WingetPackage ` + Element.Element ` + OpenWhisperSystems.Signal ` + Threema.Threema ` ; Remove-DesktopIcon "*Element*"; - Remove-DesktopIcon "*TeamSpeak*"; } }