Refactor amd driver installation script

This commit is contained in:
Manuel Thalmann 2023-07-15 20:22:51 +02:00
parent 1d2bafeb69
commit 0d69995cdd
2 changed files with 18 additions and 2 deletions

View file

@ -1,5 +1,6 @@
#!/bin/pwsh
param([Context] $context)
. "$PSScriptRoot/../../Scripts/SoftwarePackage.ps1";
Install-SoftwarePackage $context "https://drivers.amd.com/drivers/amd_chipset_software_5.05.16.529.exe";
. "$PSScriptRoot/../../Scripts/AmdSoftwarePackage.ps1";
Install-AmdSoftwarePackage "https://www.amd.com/en/support/chipsets/amd-socket-tr4/x399";

View file

@ -0,0 +1,15 @@
#!/bin/pwsh
. "$PSScriptRoot/BrowserAutomation.ps1";
function Install-AmdSoftwarePackage() {
param(
[string]$url
)
$tempDir = $context.GetTempDirectory();
$selector = 'summary:first div.driver:first a:contains("Download")';
$file = Start-AutomatedDownload $context $url $selector $tempDir;
Start-Process -Wait -FilePath $file -ArgumentList "/S";
Remove-Item -Recurse $tempDir;
}