Prevent reboot during WaveLink installation
This commit is contained in:
parent
a541982ac4
commit
dc2f840018
|
@ -159,8 +159,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") {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue