Add script for installing amd chipset driver
This commit is contained in:
parent
f6bc1a624b
commit
cfd7c17fc7
3 changed files with 31 additions and 0 deletions
|
@ -13,4 +13,5 @@ function Install-PortValhallaDrivers {
|
|||
. "$mbDriverPath/IntelWiFi/Install.ps1" $context;
|
||||
. "$mbDriverPath/AMDChipsetX399/Install.ps1" $context;
|
||||
. "$mbDriverPath/IntelBluetooth/Install.ps1" $context;
|
||||
. "$driverPath/AMDChipsetX399/Install.ps1" $context;
|
||||
}
|
||||
|
|
5
scripts/Windows/Drivers/AMDChipsetX399/Install.ps1
Normal file
5
scripts/Windows/Drivers/AMDChipsetX399/Install.ps1
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
#!/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";
|
25
scripts/Windows/Scripts/SoftwarePackage.ps1
Normal file
25
scripts/Windows/Scripts/SoftwarePackage.ps1
Normal file
|
@ -0,0 +1,25 @@
|
|||
. "$PSScriptRoot/Context.ps1";
|
||||
|
||||
function Install-SoftwarePackage([Context] $context, [string] $location, [string[]] $argumentList = @("/S"), [switch]$local) {
|
||||
[string]$filePath = "";
|
||||
[string]$tempDir = $null;
|
||||
|
||||
if (-not ($local.IsPresent)) {
|
||||
$tempDir = $context.GetTempDirectory();
|
||||
|
||||
$request = [System.Net.WebRequest]::Create($location);
|
||||
$request.AllowAutoRedirect = $false;
|
||||
$response = $request.GetResponse();
|
||||
$fileName = [System.IO.Path]::GetFileName($response.GetResponseHeader("Location"));
|
||||
|
||||
$filePath = Join-Path $tempDir $fileName;
|
||||
} else {
|
||||
$filePath = $location;
|
||||
}
|
||||
|
||||
Start-Process -Wait -FilePath $filePath -ArgumentList $argumentList;
|
||||
|
||||
if ($tempDir) {
|
||||
Remove-Item -Recurse $tempDir;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue