[Windows] win-wdk: install WDK 11 (#4014)

This commit is contained in:
Aleksandr Chebotov
2021-09-09 10:46:21 +03:00
committed by GitHub
parent 06659e17fd
commit 1052083f04
3 changed files with 49 additions and 8 deletions

View File

@@ -22,15 +22,24 @@ function Install-Binary
Param
(
[Parameter(Mandatory)]
[Parameter(Mandatory, ParameterSetName="Url")]
[String] $Url,
[Parameter(Mandatory)]
[Parameter(Mandatory, ParameterSetName="Url")]
[String] $Name,
[Parameter(Mandatory, ParameterSetName="LocalPath")]
[String] $FilePath,
[String[]] $ArgumentList
)
Write-Host "Downloading $Name..."
$filePath = Start-DownloadWithRetry -Url $Url -Name $Name
if ($PSCmdlet.ParameterSetName -eq "LocalPath")
{
$name = Split-Path -Path $FilePath -Leaf
}
else
{
Write-Host "Downloading $Name..."
$filePath = Start-DownloadWithRetry -Url $Url -Name $Name
}
# MSI binaries should be installed via msiexec.exe
$fileExtension = ([System.IO.Path]::GetExtension($Name)).Replace(".", "")