[Windows] Add WDK on Windows Server 2022 without VSIX (#5838)

* Add WDK on Windows Server 2022 without VSIX

* Fix extension names
This commit is contained in:
Aleksandr Chebotov
2022-06-29 15:46:22 +02:00
committed by GitHub
parent 45da727c67
commit 02d4539cae
5 changed files with 49 additions and 27 deletions

View File

@@ -1,11 +1,13 @@
Describe "WDK" -Skip:(Test-IsWin22) {
It "WDK exists" {
$WDKVersion = (Get-CimInstance -ClassName Win32_Product -Filter "Name = 'Windows Driver Kit'").Version
$WDKVersion| Should -Not -BeNullOrEmpty
}
Describe "WDK" {
It "WDK exists" {
$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
}
It "WDK version from system" {
$version = Get-VSExtensionVersion -packageName "Microsoft.Windows.DriverKit"
$version | Should -Not -BeNullOrEmpty
}
It "Windows Driver Kit VSIX extension" -Skip:(Test-IsWin22) {
$version = Get-VSExtensionVersion -packageName "Microsoft.Windows.DriverKit"
$version | Should -Not -BeNullOrEmpty
}
}