Property - if then else - File and Product version

I am trying to combine the following relevance together in a if , then , else statement. I am having issues with value portion. Any help would be greatly appreciated.

if (exists x64 file “C:\Program Files\Cribl\bin\cribl.exe”) then value "ProductVersion” of version block of file “C:\Program Files\Cribl\bin\cribl.exe”)as string) else “Does Not Exist”

You might be missing some parentheses. Try this:

if (exists file "C:\Program Files\Cribl\bin\cribl.exe") then (value "ProductVersion" of version block of file "C:\Program Files\Cribl\bin\cribl.exe") else ("Does Not Exist")

if () then () else ()

use a template to keep the parentheses organized to start with

if (test relevance returns T or F) then (true response as a particular type) else (false response in same particular type)

See: https://developer.bigfix.com/relevance/reference/file-version-block.html

value <string> of version block returns string.

2 Likes

Thanks so much for assisting me with this and great advise