2 Replies Latest reply on May 3, 2018 10:45 AM by coinich

    Alert when Java Updates?


      I'm looking to configure an alert for when Java updates on a node.  I'm sure there's a few ways to go about it, not sure which one is best.  I can do a File Change Monitor on the .dll and .exe files, but would I have to update the threshold every time we approve an update?  Or would the baseline re-adjust?


      I was also looking into a WMI query, but while I would normally use this: "wmic product where "name like '%Java%'" get version", I'm not certain how to integrate it with the WMI component.  I don't believe I had the syntax proper for the WMI Component to use.


      I tried inputting the query in the Powershell Monitor, but the condition returned was always "false" and thus unreliable.






      $val = [System.Diagnostics.FileVersionInfo]::GetVersionInfo("C:\Program Files\Java\jre1.8.0_171\bin\java.exe").FileVersion


      if ($val -eq $file_ver) {

           Write-Host "Statistic: 0"

      } else {

           Write-Host "Statistic: 1"


      Exit 0 


      Any ideas on how to best implement this?