2020-06-02 06:32:23 +00:00
|
|
|
function Get-VisualStudioVersion {
|
|
|
|
|
$vsVersion = vswhere -format json | ConvertFrom-Json
|
|
|
|
|
[PSCustomObject]@{
|
|
|
|
|
Name = $vsVersion.displayName
|
|
|
|
|
Version = $vsVersion.installationVersion
|
|
|
|
|
Path = $vsVersion.installationPath
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function Get-WixVersion {
|
|
|
|
|
$regKey = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
|
|
|
|
|
$installedApplications = Get-ItemProperty -Path $regKey
|
|
|
|
|
($installedApplications | Where-Object { $_.DisplayName -match "wix" } | Select-Object -First 1).DisplayVersion
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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-04-23 19:38:43 +03:00
|
|
|
# Additional vsixs
|
|
|
|
|
$toolset = Get-ToolsetContent
|
|
|
|
|
$vsixUrls = $toolset.visualStudio.vsix
|
|
|
|
|
if ($vsixUrls)
|
|
|
|
|
{
|
|
|
|
|
$vsixs = $vsixUrls | ForEach-Object {
|
|
|
|
|
$vsix = Get-VsixExtenstionFromMarketplace -ExtensionMarketPlaceName $_
|
|
|
|
|
$vsixVersion = (Get-VisualStudioPackages | Where-Object {$_.Id -match $vsix.VsixId -and $_.type -eq 'vsix'}).Version
|
|
|
|
|
@{
|
|
|
|
|
Package = $vsix.ExtensionName
|
|
|
|
|
Version = $vsixVersion
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-06-02 06:32:23 +00:00
|
|
|
# Wix
|
|
|
|
|
$vs = (Get-VisualStudioVersion).Name.Split()[-1]
|
2020-07-27 18:28:18 +03:00
|
|
|
$wixPackageVersion = Get-WixVersion
|
2020-09-10 17:04:24 +03:00
|
|
|
$wixExtensionVersion = (Get-VisualStudioPackages | Where-Object {$_.Id -match 'WixToolset.VisualStudioExtension.Dev' -and $_.type -eq 'vsix'}).Version
|
2020-06-02 06:32:23 +00:00
|
|
|
|
|
|
|
|
# WDK
|
2020-09-10 17:04:24 +03:00
|
|
|
$wdkPackageVersion = Get-VSExtensionVersion -packageName 'Microsoft.Windows.DriverKit'
|
2020-06-02 06:32:23 +00:00
|
|
|
$wdkExtensionVersion = Get-WDKVersion
|
|
|
|
|
|
|
|
|
|
$extensions = @(
|
2021-04-23 19:38:43 +03:00
|
|
|
$vsixs
|
|
|
|
|
@{Package = 'Windows Driver Kit'; Version = $wdkPackageVersion}
|
2020-06-02 06:32:23 +00:00
|
|
|
@{Package = 'Windows Driver Kit Visual Studio Extension'; Version = $wdkExtensionVersion}
|
|
|
|
|
@{Package = 'WIX Toolset'; Version = $wixPackageVersion}
|
|
|
|
|
@{Package = "WIX Toolset Studio $vs Extension"; Version = $wixExtensionVersion}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
$extensions | Foreach-Object {
|
|
|
|
|
[PSCustomObject]$_
|
2021-04-23 19:38:43 +03:00
|
|
|
} | Select-Object Package, Version | Sort-Object Package
|
2020-06-02 06:32:23 +00:00
|
|
|
}
|