I have an exe that does not show up when using regapps. The exe itself may be in various drive letters (C, D, E or X)
This works good for me.
Q: exists (file “C:\Program Files\CustomApp\Custom.exe”) or exists (file “D:\Program Files\CustomApp\Custom.exe”) OR exists (file “X:\Program Files\CustomApp\Custom.exe”)
A: True
and so does this
Q: if (exists file “C:\Program Files\CustomApp\Custom.exe”) then (version of file “C:\Program Files\CustomApp\Custom.exe” as string) else “None”
A: 6.2
But what I am trying to do is somethins like thiis – but it doesen’t work. I’m looking at finding the file version regardless of where it is installed
Q: if (exists file “C:\Program Files\CustomApp\Custom.exe”) then (version of file “C:\Program Files\CustomApp\Custom.exe” as string) else “None” or if (exists file “D:\Program Files\CustomApp\Custom.exe”) then (version of file “D:\Program Files\CustomApp\Custom.exe” as string) else “None” or if (exists file “X:\Program Files\CustomApp\Custom.exe”) then (version of file “X:\Program Files\CustomApp\Custom.exe” as string) else “None”
versions of files ((it & “\Program Files\CustomApp\Custom.exe”) of (names of drives whose (type of it = “DRIVE_FIXED”) ))
That will return the version for any files that exists, or blank if the files don’t exist. If you remove the check for “DRIVE_FIXED”, you should set your property to evaluate less frequently than every report in order to avoid hitting the networked drives constantly. Also, you should not create a Fixlet message with relevance that checks the network locations. Instead, create a Fixlet that performs whatever action you’d like to perform and target any actions taken from it at machines based on a property that checks the network drives (infrequently).