From 88c765b06e247f85b5802fda49ee5b8063bbeb32 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Wed, 7 Aug 2024 18:54:07 +0200 Subject: [PATCH] Install drivers in proper phase --- scripts/Windows/OS/Install.ps1 | 36 ++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index 27d790a1..376e6fb4 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -144,26 +144,28 @@ $null = New-Module { } } - if (Get-Config "valhalla.hardware.amdCPU") { - Install-ChocoPackage amd-ryzen-master; - # ToDo: backup Ryzen energy saving plan - } + if (-not $Action -or ($Action -eq ([InstallerAction]::Install))) { + if (Get-Config "valhalla.hardware.amdCPU") { + Install-ChocoPackage amd-ryzen-master; + # ToDo: backup Ryzen energy saving plan + } - if (Get-Config "valhalla.hardware.nvidiaGPU") { - Install-ChocoPackage geforce-game-ready-driver; - Remove-DesktopIcon "*Geforce*"; - } + if (Get-Config "valhalla.hardware.nvidiaGPU") { + Install-ChocoPackage geforce-game-ready-driver; + Remove-DesktopIcon "*Geforce*"; + } - if (Get-Config "valhalla.hardware.corsairLighting") { - Install-ChocoPackage icue; - } + if (Get-Config "valhalla.hardware.corsairLighting") { + Install-ChocoPackage icue; + } - if (Get-Config "valhalla.hardware.elgatoWave") { - if (-not (Test-ChocoPackage wavelink)) { - Install-ChocoPackage wavelink -ArgumentList '--install-arguments="/norestart"'; - Remove-DesktopIcon "*Wave Link*"; - Restart-Intermediate; - exit; + if (Get-Config "valhalla.hardware.elgatoWave") { + if (-not (Test-ChocoPackage wavelink)) { + Install-ChocoPackage wavelink -ArgumentList '--install-arguments="/norestart"'; + Remove-DesktopIcon "*Wave Link*"; + Restart-Intermediate; + exit; + } } }