mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-15 06:19:21 +00:00
26 lines
861 B
PowerShell
26 lines
861 B
PowerShell
################################################################################
|
|
## File: Validate-Chrome.ps1
|
|
## Desc: Validate Google Chrome installation.
|
|
################################################################################
|
|
|
|
if(Test-Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe")
|
|
{
|
|
(Get-Item (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe').'(Default)').VersionInfo
|
|
|
|
$SoftwareName = "Google Chrome"
|
|
$fileVersion = (Get-Item (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe').'(Default)').VersionInfo.FileVersion
|
|
$Description = @"
|
|
_version:_
|
|
$fileVersion
|
|
"@
|
|
|
|
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
|
|
|
|
exit 0
|
|
}
|
|
else
|
|
{
|
|
Write-Host "Google Chrome is not installed."
|
|
exit 1
|
|
}
|