2019-12-13 09:48:00 -05:00
|
|
|
################################################################################
|
|
|
|
|
## File: Install-WDK.ps1
|
|
|
|
|
## Desc: Install the Windows Driver Kit
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
# Requires Windows SDK with the same version number as the WDK
|
2023-11-22 15:14:08 +01:00
|
|
|
if (Test-IsWin19) {
|
|
|
|
|
# Install all features without showing the GUI using winsdksetup.exe
|
|
|
|
|
Install-Binary -Type EXE `
|
|
|
|
|
-Url 'https://go.microsoft.com/fwlink/?linkid=2173743' `
|
|
|
|
|
-InstallArgs @("/features", "+", "/quiet") `
|
|
|
|
|
-ExpectedSignature '44796EB5BD439B4BFB078E1DC2F8345AE313CBB1'
|
|
|
|
|
|
2021-09-09 10:46:21 +03:00
|
|
|
$wdkUrl = "https://go.microsoft.com/fwlink/?linkid=2166289"
|
2023-10-11 11:02:59 +02:00
|
|
|
$wdkSignatureThumbprint = "914A09C2E02C696AF394048BCB8D95449BCD5B9E"
|
2023-11-22 15:14:08 +01:00
|
|
|
$wdkExtensionPath = "C:\Program Files (x86)\Windows Kits\10\Vsix\VS2019\WDK.vsix"
|
|
|
|
|
} elseif (Test-IsWin22) {
|
|
|
|
|
# SDK is available through Visual Studio
|
2024-11-13 20:09:50 +00:00
|
|
|
$wdkUrl = "https://go.microsoft.com/fwlink/?linkid=2294834"
|
|
|
|
|
$wdkSignatureThumbprint = "7920AC8FB05E0FFFE21E8FF4B4F03093BA6AC16E"
|
2022-06-29 15:46:22 +02:00
|
|
|
} else {
|
2022-09-09 10:56:40 +02:00
|
|
|
throw "Invalid version of Visual Studio is found. Either 2019 or 2022 are required"
|
2021-08-04 09:35:16 +03:00
|
|
|
}
|
2020-03-16 17:28:46 +00:00
|
|
|
|
2023-11-22 15:14:08 +01:00
|
|
|
# Install all features without showing the GUI using wdksetup.exe
|
|
|
|
|
Install-Binary -Type EXE `
|
|
|
|
|
-Url $wdkUrl `
|
|
|
|
|
-InstallArgs @("/features", "+", "/quiet") `
|
|
|
|
|
-ExpectedSignature $wdkSignatureThumbprint
|
2019-12-13 09:48:00 -05:00
|
|
|
|
2024-11-13 20:09:50 +00:00
|
|
|
if (Test-IsWin19){
|
|
|
|
|
# Need to install the VSIX to get the build targets when running VSBuild
|
|
|
|
|
Install-VSIXFromFile (Resolve-Path -Path $wdkExtensionPath)
|
|
|
|
|
}
|
2020-07-30 12:12:49 +05:00
|
|
|
Invoke-PesterTests -TestFile "WDK"
|