# Alert if Chrome is Older than X

**URL:** <https://community.simple-help.com/t/alert-if-chrome-is-older-than-x/1015>\
**Category:** Alerts and Toolboxes\
**Created:** [March 26, 2022, 7:31pm UTC](https://community.simple-help.com/t/alert-if-chrome-is-older-than-x/1015 "2022-03-26T19:31:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trey\_Thompson](https://community.simple-help.com/user_avatar/community.simple-help.com/trey_thompson/32/385_2.png) [@Trey\_Thompson](https://community.simple-help.com/u/Trey_Thompson)\
**Post date:** [March 26, 2022, 7:31pm UTC](https://community.simple-help.com/t/alert-if-chrome-is-older-than-x/1015/1 "2022-03-26T19:31:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Darrell\_Swafford](https://community.simple-help.com/user_avatar/community.simple-help.com/darrell_swafford/32/82_2.png) [@Darrell\_Swafford](https://community.simple-help.com/u/Darrell_Swafford)\
**Post date:** [March 27, 2022, 6:19pm UTC](https://community.simple-help.com/t/alert-if-chrome-is-older-than-x/1015/2 "2022-03-27T18:19:48Z")

</div>

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

> <https://stackoverflow.com/questions/52457766/how-can-i-get-google-chromes-version-number>

- 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}

---

<div class="post-metadata">

**Author:** ![Trey\_Thompson](https://community.simple-help.com/user_avatar/community.simple-help.com/trey_thompson/32/385_2.png) [@Trey\_Thompson](https://community.simple-help.com/u/Trey_Thompson)\
**Post date:** [March 28, 2022, 4:34pm UTC](https://community.simple-help.com/t/alert-if-chrome-is-older-than-x/1015/3 "2022-03-28T16:34:24Z")

</div>

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  
> }
