diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index 6ed25f71..547ff9e7 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -158,8 +158,12 @@ $null = New-Module { } if (Get-Config "valhalla.hardware.elgatoWave") { - Install-ChocoPackage wavelink; - Remove-DesktopIcon "*Wave Link*"; + if (-not (Test-ChocoPackage wavelink)) { + Install-ChocoPackage wavelink -ArgumentList '--install-arguments="/norestart"'; + Remove-DesktopIcon "*Wave Link*"; + Restart-Intermediate; + exit; + } } if (Get-Config "valhalla.hardware.eyeX") { diff --git a/scripts/Windows/Scripts/Software.ps1 b/scripts/Windows/Scripts/Software.ps1 index 2983ee92..1c82dfc4 100644 --- a/scripts/Windows/Scripts/Software.ps1 +++ b/scripts/Windows/Scripts/Software.ps1 @@ -19,11 +19,16 @@ $null = New-Module { function Install-ChocoPackage { param( [switch] $Force, + [string[]] $ArgumentList, + [Parameter(Position=0)] + [string] $Name, [Parameter(ValueFromRemainingArguments = $true)] - [string[]] $Names + [string[]] $AdditionalNames = @() ) - [System.Collections.ArrayList] $Names = $Names; + [System.Collections.ArrayList] $Names = @(); + $null = $Names.Add($Name); + $Names.AddRange($AdditionalNames); if (-not ($Force.IsPresent)) { for ($i = $Names.Count - 1; $i -ge 0; $i--) { @@ -34,7 +39,7 @@ $null = New-Module { } if ($Names.Count -ge 1) { - choco install -y $Names; + choco install -y $ArgumentList $Names; } }