Add WDK on Windows Server 2022 (#5652)

This commit is contained in:
Aleksandr Chebotov
2022-06-01 15:13:31 +02:00
committed by GitHub
parent e27faa696e
commit 16f6912f37
5 changed files with 33 additions and 20 deletions

View File

@@ -1,6 +1,8 @@
Describe "WDK" -Skip:(Test-IsWin22) {
Describe "WDK" {
It "WDK exists" {
$WDKVersion = (Get-CimInstance -ClassName Win32_Product -Filter "Name = 'Windows Driver Kit'").Version
$regKey = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
$installedApplications = Get-ItemProperty -Path $regKey
$WDKVersion = $installedApplications | Where-Object DisplayName -eq 'Windows Driver Kit' | Select-Object -First 1 -ExpandProperty DisplayVersion
$WDKVersion| Should -Not -BeNullOrEmpty
}