@@ -4,18 +4,18 @@ properties:
44 - resource : Microsoft.WinGet.DSC/WinGetPackage
55 id : vsPackage
66 directives :
7- description : Install Visual Studio Community 2022
7+ description : Install Visual Studio 2022 Community
88 allowPrerelease : true
99 settings :
1010 id : Microsoft.VisualStudio.2022.Community
1111 source : winget
12+ useLatest : true
1213 - resource : Microsoft.VisualStudio.DSC/VSComponents
1314 id : vsComponents
1415 dependsOn :
1516 - vsPackage
1617 directives :
17- description : Install required VS workloads
18- allowPrerelease : true
18+ description : Install required VS workloads and components
1919 settings :
2020 productId : Microsoft.VisualStudio.Product.Community
2121 channelId : VisualStudio.17.Release
@@ -42,28 +42,26 @@ properties:
4242 - Microsoft.VisualStudio.Component.VC.MFC.ARM64
4343 - Microsoft.VisualStudio.Component.VC.MFC.ARM64.Spectre
4444 - Microsoft.VisualStudio.Workload.NativeDesktop
45-
4645 - resource : Microsoft.WinGet.DSC/WinGetPackage
4746 id : sdkPackage
48- dependsOn :
49- - vsComponents
5047 directives :
51- description : Install Windows SDK
48+ description : Install Windows SDK version 26100
5249 allowPrerelease : true
5350 settings :
5451 id : Microsoft.WindowsSDK.10.0.26100
5552 source : winget
53+ useLatest : true
5654 - resource : Microsoft.WinGet.DSC/WinGetPackage
5755 id : wdkPackage
5856 dependsOn :
5957 - sdkPackage
60- - vsComponents
6158 directives :
62- description : Install Windows Driver Kit
59+ description : Install Windows Driver Kit version 26100
6360 allowPrerelease : true
6461 settings :
6562 id : Microsoft.WindowsWDK.10.0.26100
6663 source : winget
64+ useLatest : true
6765 - resource : PSDscResources/Script
6866 id : wdkVsix
6967 dependsOn :
@@ -73,15 +71,11 @@ properties:
7371 description : Install Windows Driver Kit VSIX
7472 settings :
7573 GetScript : |
76- return & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -nologo -latest -products Microsoft.VisualStudio.Product.Community -requires Microsoft.Windows.DriverKit -property installationVersion
74+ return & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -nologo -version '[17.0,18.0)' -requires Microsoft.Windows.DriverKit -property installationVersion
7775 SetScript : |
78- $path = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -nologo -latest -products * -property enginePath | Join-Path -ChildPath 'VSIXInstaller.exe'
79- $arch = $env:PROCESSOR_ARCHITECTURE
80- if (Test-Path $path) { & $path /q "${env:ProgramFiles(x86)}\Windows Kits\10\Vsix\VS2022\10.0.26100.0\$arch\WDK.vsix" }
76+ $installerPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -nologo -latest -products * -property enginePath | Join-Path -ChildPath 'VSIXInstaller.exe'
77+ if (Test-Path $installerPath) { & $installerPath /q "${env:ProgramFiles(x86)}\Windows Kits\10\Vsix\VS2022\10.0.26100.0\${env:PROCESSOR_ARCHITECTURE}\WDK.vsix" }
8178 TestScript : |
82- $versionString = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -nologo -latest -products Microsoft.VisualStudio.Product.Community -requires Microsoft.Windows.DriverKit -Property installationVersion
83- if (-not $versionString) { return $false }
84- $versionArray = $versionString.Split('.')
85- if ($versionArray[0] -le 17) { return $false }
86- return $true
79+ $versionString = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -nologo -version '[17.0,18.0)' -requires Microsoft.Windows.DriverKit -property installationVersion
80+ return $versionString -match "^17\."
8781 configurationVersion : 0.2.0
0 commit comments