[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

@@ -6,8 +6,8 @@
# Requires Windows SDK with the same version number as the WDK
if (Test-IsWin19)
{
$winSdkUrl = "https://go.microsoft.com/fwlink/?linkid=2164145"
$wdkUrl = "https://go.microsoft.com/fwlink/?linkid=2164149"
$winSdkUrl = "https://go.microsoft.com/fwlink/?linkid=2166460"
$wdkUrl = "https://go.microsoft.com/fwlink/?linkid=2166289"
$FilePath = "C:\Program Files (x86)\Windows Kits\10\Vsix\VS2019\WDK.vsix"
$VSver = "2019"
}
@@ -25,8 +25,25 @@ else
$argumentList = ("/features", "+", "/quiet")
# `winsdksetup.exe /features + /quiet` installs all features without showing the GUI
Install-Binary -Url $winSdkUrl -Name "winsdksetup.exe" -ArgumentList $argumentList
if (Test-IsWin19)
{
# Download WDK ISO file
$isoPath = Start-DownloadWithRetry -Url $winSdkUrl -Name winsdk.iso
$diskImage = Mount-DiskImage -ImagePath $isoPath
$driveLetter = ($diskImage | Get-Volume).DriveLetter
$sdkPath = Join-Path "${driveLetter}:\" "winsdksetup.exe"
# `winsdksetup.exe /features + /quiet` installs all features without showing the GUI
Install-Binary -FilePath $sdkPath -ArgumentList $argumentList
# Dismount ISO
Dismount-DiskImage -DevicePath $diskImage.DevicePath | Out-Null
}
else
{
# `winsdksetup.exe /features + /quiet` installs all features without showing the GUI
Install-Binary -Url $winSdkUrl -Name "winsdksetup.exe" -ArgumentList $argumentList
}
# `wdksetup.exe /features + /quiet` installs all features without showing the GUI
Install-Binary -Url $wdkUrl -Name "wdksetup.exe" -ArgumentList $argumentList