Skip to content

Commit

Permalink
更新。
Browse files Browse the repository at this point in the history
  • Loading branch information
kouzhudong committed Jan 17, 2024
1 parent 373b4dd commit b18f3b7
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/Install-WDK.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@
################################################################################

# Requires Windows SDK with the same version number as the WDK
if (Test-IsWin22) {
# SDK available through Visual Studio
$wdkUrl = "https://go.microsoft.com/fwlink/?linkid=2196230"
$FilePath = "C:\Program Files (x86)\Windows Kits\10\Vsix\VS2022\*\WDK.vsix"
$VSver = "2022"
} elseif (Test-IsWin19) {
$winSdkUrl = "https://go.microsoft.com/fwlink/?linkid=2173743"
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'

$wdkUrl = "https://go.microsoft.com/fwlink/?linkid=2166289"
$FilePath = "C:\Program Files (x86)\Windows Kits\10\Vsix\VS2019\WDK.vsix"
$VSver = "2019"
$wdkSignatureThumbprint = "914A09C2E02C696AF394048BCB8D95449BCD5B9E"
$wdkExtensionPath = "C:\Program Files (x86)\Windows Kits\10\Vsix\VS2019\WDK.vsix"
} elseif (Test-IsWin22) {
# SDK is available through Visual Studio
$wdkUrl = "https://go.microsoft.com/fwlink/?linkid=2249371"
$wdkSignatureThumbprint = "7C94971221A799907BB45665663BBFD587BAC9F8"
$wdkExtensionPath = "C:\Program Files (x86)\Windows Kits\10\Vsix\VS2022\*\WDK.vsix"
} else {
throw "Invalid version of Visual Studio is found. Either 2019 or 2022 are required"
}

$argumentList = ("/features", "+", "/quiet")

if (Test-IsWin19) {
# `winsdksetup.exe /features + /quiet` installs all features without showing the GUI
Install-Binary -Url $winSdkUrl "winsdksetup.exe" -ArgumentList $argumentList
}

# `wdksetup.exe /features + /quiet` installs all features without showing the GUI
Install-Binary -Url $wdkUrl "wdksetup.exe" -ArgumentList $argumentList
# Install all features without showing the GUI using wdksetup.exe
Install-Binary -Type EXE `
-Url $wdkUrl `
-InstallArgs @("/features", "+", "/quiet") `
-ExpectedSignature $wdkSignatureThumbprint

# Need to install the VSIX to get the build targets when running VSBuild
$FilePath = Resolve-Path -Path $FilePath
Install-VsixExtension -FilePath $FilePath "WDK.vsix" -VSversion $VSver -InstallOnly
Install-VSIXFromFile (Resolve-Path -Path $wdkExtensionPath)

Invoke-PesterTests -TestFile "WDK"

0 comments on commit b18f3b7

Please sign in to comment.