Java.exe path and version

I created an Analysis using:
(pathnames of files whose ((name of it starts with “java.exe” )) of (descendant folders of folder "c:"))
So I could report all the paths of Java.exe in my environment.

Now we need the path and also the java.exe version…

Any suggestions?

Here it is but just be careful cause these inspectors scans the entire filesystem so it may be evaluating for a long time depending on sizes and on top of it you don’t know how much data that will produce depending on your environment… I’d personally never go about it this way (rather ran a script output to a file and then read them back - data would be the same obviously but at least I can rule out impact on client and system performances)…

((pathname of it & " | " & (if (exist version of it) then (version of it as string) else (“N/A”))) of files whose ((name of it starts with “java.exe” )) of (descendant folders of folder “c:”))

1 Like

To add to @ageorgiev, I would steer clear from use relevance to scan the entire file system due to the IO hit a property would cause each tiem to re-evaluates. It is also possible you will not get results as I believe there is a time limit to how long the agent wait before expecting results from a property, which I believe is something like seconds. What works in the debugger may not work at the client level. I would opt to run a task than does a recursive DIR then use a property to read the results of the file, as suggested by @ageorgiev.

If you use the DIR approach, be sure to use the locked lines of file inspector for the property in case it tries to read the file while the DIR command has it locked for writing.

Thank you. Created an analysis and got all the information we needed. Regards.