2020-06-02 06:32:23 +00:00
|
|
|
function Get-VisualStudioVersion {
|
2021-08-04 22:35:44 +03:00
|
|
|
$vsInstance = Get-VisualStudioInstance
|
2020-06-02 06:32:23 +00:00
|
|
|
[PSCustomObject]@{
|
2021-08-04 22:35:44 +03:00
|
|
|
Name = $vsInstance.DisplayName
|
|
|
|
|
Version = $vsInstance.InstallationVersion
|
|
|
|
|
Path = $vsInstance.InstallationPath
|
2020-06-02 06:32:23 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-09-09 10:46:21 +03:00
|
|
|
function Get-SDKVersion {
|
|
|
|
|
$regKey = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
|
|
|
|
|
$installedApplications = Get-ItemProperty -Path $regKey
|
|
|
|
|
($installedApplications | Where-Object { $_.DisplayName -eq 'Windows SDK' } | Select-Object -First 1).DisplayVersion
|
|
|
|
|
}
|
|
|
|
|
|
2020-06-02 06:32:23 +00:00
|
|
|
function Get-WDKVersion {
|
|
|
|
|
$regKey = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
|
|
|
|
|
$installedApplications = Get-ItemProperty -Path $regKey
|
|
|
|
|
($installedApplications | Where-Object { $_.DisplayName -eq 'Windows Driver Kit' } | Select-Object -First 1).DisplayVersion
|
|
|
|
|
}
|
|
|
|
|
|
2020-06-17 04:44:33 -04:00
|
|
|
function Get-VisualStudioExtensions {
|
2021-08-04 22:35:44 +03:00
|
|
|
$vsPackages = (Get-VisualStudioInstance).Packages
|
|
|
|
|
|
2021-04-23 19:38:43 +03:00
|
|
|
# Additional vsixs
|
|
|
|
|
$toolset = Get-ToolsetContent
|
2023-11-30 16:53:16 +01:00
|
|
|
$vsixPackagesList = $toolset.visualStudio.vsix
|
|
|
|
|
if ($vsixPackagesList) {
|
|
|
|
|
$vsixs = $vsixPackagesList | ForEach-Object {
|
|
|
|
|
$vsixPackage = Get-VsixInfoFromMarketplace $_
|
|
|
|
|
$vsixVersion = ($vsPackages | Where-Object { $_.Id -match $vsixPackage.VsixId -and $_.type -eq 'vsix' }).Version
|
2021-04-23 19:38:43 +03:00
|
|
|
@{
|
2023-11-30 16:53:16 +01:00
|
|
|
Package = $vsixPackage.ExtensionName
|
2021-04-23 19:38:43 +03:00
|
|
|
Version = $vsixVersion
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-09-09 10:46:21 +03:00
|
|
|
# SDK
|
2022-09-09 10:56:40 +02:00
|
|
|
$sdkVersion = Get-SDKVersion
|
|
|
|
|
$sdkPackages = @(
|
2023-11-30 16:53:16 +01:00
|
|
|
@{Package = 'Windows Software Development Kit'; Version = $sdkVersion }
|
2022-09-09 10:56:40 +02:00
|
|
|
)
|
2022-06-29 15:46:22 +02:00
|
|
|
|
2022-09-09 10:56:40 +02:00
|
|
|
# WDK
|
2024-12-13 11:54:30 +01:00
|
|
|
if (-not (Test-IsWin25)) {
|
|
|
|
|
$wdkVersion = Get-WDKVersion
|
|
|
|
|
$wdkPackages = @(
|
|
|
|
|
@{Package = 'Windows Driver Kit'; Version = $wdkVersion }
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# WDK extension
|
2022-09-09 10:56:40 +02:00
|
|
|
$wdkExtensionVersion = Get-VSExtensionVersion -packageName 'Microsoft.Windows.DriverKit'
|
2024-12-13 11:54:30 +01:00
|
|
|
$wdkExtensions = @(
|
2023-11-30 16:53:16 +01:00
|
|
|
@{Package = 'Windows Driver Kit Visual Studio Extension'; Version = $wdkExtensionVersion }
|
2022-09-09 10:56:40 +02:00
|
|
|
)
|
2020-06-02 06:32:23 +00:00
|
|
|
|
|
|
|
|
$extensions = @(
|
2021-04-23 19:38:43 +03:00
|
|
|
$vsixs
|
2021-09-09 10:46:21 +03:00
|
|
|
$sdkPackages
|
2021-08-04 09:35:16 +03:00
|
|
|
$wdkPackages
|
2024-12-13 11:54:30 +01:00
|
|
|
$wdkExtensions
|
2020-06-02 06:32:23 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
$extensions | Foreach-Object {
|
2023-11-30 16:53:16 +01:00
|
|
|
[PSCustomObject] $_
|
2021-04-23 19:38:43 +03:00
|
|
|
} | Select-Object Package, Version | Sort-Object Package
|
2022-02-07 20:53:07 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function Get-WindowsSDKs {
|
|
|
|
|
$path = "${env:ProgramFiles(x86)}\Windows Kits\10\Extension SDKs\WindowsDesktop"
|
|
|
|
|
return [PSCustomObject]@{
|
2023-11-30 16:53:16 +01:00
|
|
|
Path = $path
|
2022-02-07 20:53:07 +03:00
|
|
|
Versions = $(Get-ChildItem $path).Name
|
|
|
|
|
}
|
2023-11-30 16:53:16 +01:00
|
|
|
}
|