/build/static/layout/Breadcrumb_cap_w.png

Custom Inventory rules to find any device with 'Java' in a specific Reg key

I'm looking to see if there is a simple way to find a word in a specific registry key. For instance, I'm looking to find devices that have the word 'java' anywhere under the following subkey: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

Normally I would use a custom inventory to find a specific reg entry, but as this is more searching for reg entries, I don't think thats possible. I don't think custom inventory uses wildcards for things like this, and I was wondering if there is any recommendations for best practices for this. Thanks!


0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
Posted by: seanboy 1 month ago
Orange Senior Belt
0

fwiw in case others have a similar issue, my plan is to run a script to query the reg key and, if any results are found, output results to a text file. then do a custom inventory to detect (and read) that text file. 

Posted by: AmberSDNB 1 month ago
Second Degree Blue Belt
0

Top Answer

Are you just trying to determine what computers have Java installed and what version it is? Not all instances of Java will write to the uninstall area of registry, for example if it's bundled into a piece of software. We use this to pull the info...
ShellCommandTextReturn(cmd /q /c C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -command "Get-ChildItem 'C:\' -Filter 'java.exe' -Recurse -ErrorAction SilentlyContinue | ForEach-Object {$_.VersionInfo}")

(this is for the 64 bit agent. If you have the 32 bit agent still, change 'C:\windows\System32' to 'C:\windows\sysnative' in the Powershell file path. Or if you have mixed agent environment create a second Custom Inventory Rule, one with each path)

This will show you all versions of java and where the file lives. It checks all of the C: drive but it runs pretty fast.

A6BYxFkU94l3AAAAAElFTkSuQmCC


If that's not what you're looking for, I guess what is your goal exactly by querying that area?


Comments:
  • sorry for the delayed follow up - thanks AmberSDNB! This is really helpful. - seanboy 1 day ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ