Alert if Chrome is Older than X

I’m trying to get an Alert if a specific application is older than version X, but I’m not getting anywhere. With today’s Chrome exploit, as an example, I’d like to Alert if Chrome is older than 99.0.4844.84. Is there a way to do this?

I know, 3rd party tools handle this, but we’ve not implemented that yet.

You could use a custom script in your toolbox with the alert.
Something like this I think should work:
Source:

  • note: quotes get messed up when copying and pasting to form. Replace them from smart quotes to normal quotes. Change your chrome version you want to alert on. Script is an example and will probably need to be tweaked to fit your needs. Be sure to read the Simplehelp guide on custom alerts.

$ChromeCurrentver = “98.0.0”
$ChromePath = “C:\Program Files\Google\Chrome\Application\chrome.exe”
$chromeinstalledver=[System.Diagnostics.FileVersionInfo]::GetVersionInfo($ChromePath).ProductVersion
If ($chromeinstalledver -lt $ChromeCurrentver) { Write-Host “Chrome Installed Version $chromeinstalledver is less than the specififed version: $ChromeCurrentver” $return=1} else { Write-Host “All is well. Chrome version: $chromeinstalledver” $return=0}

Thank you so much! This is exactly what I was looking for. We’ve got a mix of 32 and 64 bit Chrome, regardless of OS, so I expanded it to this. It’s not perfect or pretty, but it appears to do what we want. I can now use this in an alert. Thanks!

$ChromeMinVer = “99.0.4844.84”
$ChromePath32 = “C:\Program Files\Google\Chrome\Application\chrome.exe”
$ChromePath64 = “C:\Program Files (x86)\Google\Chrome\Application\chrome.exe”
if (Test-Path -Path $ChromePath32 -PathType Leaf) {
$ChromeInstalledVer = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($ChromePath32).ProductVersion
If ($ChromeInstalledVer -lt $ChromeMinVer) {
Write-Host “WARNING! Chrome Outdated!”
Write-Host “[$ChromePath32]”
Write-Host “[$ChromeMinVer] - Chrome Min Version”
Write-Host “[$ChromeInstalledVer] - Chrome Version”
$return=1
}
else {
Write-Host “Chrome Current!”
Write-Host “[$ChromePath32]”
Write-Host “[$ChromeMinVer] - Chrome Min Version”
Write-Host “[$ChromeInstalledVer] - Chrome Version”
$return=0
}
}
elseif (Test-Path -Path $ChromePath64 -PathType Leaf) {
$ChromeInstalledVer = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($ChromePath64).ProductVersion
If ($ChromeInstalledVer -lt $ChromeMinVer) {
Write-Host “WARNING! Chrome Outdated!”
Write-Host “[$ChromePath64]”
Write-Host “[$ChromeMinVer] - Chrome Min Version”
Write-Host “[$ChromeInstalledVer] - Chrome Version”
$return=1
}
else {
Write-Host “Chrome Current!”
Write-Host “[$ChromePath64]”
Write-Host “[$ChromeMinVer] - Chrome Min Version”
Write-Host “[$ChromeInstalledVer] - Chrome Version”
$return=0
}
}
else {
Write-Host “Chrome not installed.”
$return=0
}

1 Like