mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
* add extensions * add exe installation * change Reporting Services name * add switch to function, add validation * change install wdk to function * Fix template * fix scripts name * add quotes * more quotes * one more quotes * get rid of duplicate code * move quotes to function * small improvment to wix installation * add comment to validate extensions script
47 lines
1.4 KiB
PowerShell
47 lines
1.4 KiB
PowerShell
################################################################################
|
|
## File: Validate-Wix.ps1
|
|
## Desc: Validate WIX.
|
|
################################################################################
|
|
|
|
Import-Module -Name ImageHelpers -Force
|
|
|
|
function Get-WixVersion {
|
|
$regKey = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
|
|
$installedApplications = Get-ItemProperty -Path $regKey
|
|
$Version = ($installedApplications | Where-Object { $_.DisplayName -and $_.DisplayName.toLower().Contains("wix") } | Select-Object -First 1).DisplayVersion
|
|
return $Version
|
|
}
|
|
|
|
$WixToolSetVersion = Get-WixVersion
|
|
|
|
if($WixToolSetVersion) {
|
|
Write-Host "Wix Toolset version" $WixPackage.version "installed"
|
|
}
|
|
else {
|
|
Write-Host "Wix Toolset is not installed"
|
|
exit 1
|
|
}
|
|
|
|
if(Test-IsWin19)
|
|
{
|
|
$WixPackageVersion = Get-VSExtensionVersion -packageName "WixToolset.VisualStudioExtension.Dev16"
|
|
$VSver = "2019"
|
|
}
|
|
else
|
|
{
|
|
$WixPackageVersion = Get-VSExtensionVersion -packageName "WixToolset.VisualStudioExtension.Dev15"
|
|
$VSver = "2017"
|
|
}
|
|
|
|
# Adding description of the software to Markdown
|
|
$SoftwareName = "WIX Tools"
|
|
|
|
$Description = @"
|
|
_Toolset Version:_ $WixToolSetVersion<br/>
|
|
_WIX Toolset Studio $VSver Extension Version:_ $WixPackageVersion<br/>
|
|
_Environment:_
|
|
* WIX: Installation root of WIX
|
|
"@
|
|
|
|
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
|