Refactor amd driver installation script
This commit is contained in:
parent
1d2bafeb69
commit
0d69995cdd
2 changed files with 18 additions and 2 deletions
|
@ -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";
|
||||
|
|
15
scripts/Windows/Scripts/AmdSoftwarePackage.ps1
Normal file
15
scripts/Windows/Scripts/AmdSoftwarePackage.ps1
Normal 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;
|
||||
}
|
Loading…
Reference in a new issue