(imported topic written by johnsonbj91)
I’m looking to author or find an analysis that runs maybe once a day that will return a list of software installed on a Mac. Would someoen perchance already have created something like this? I’ve tried searching the forums but I wasn’t able to find anything like what I have for Windows side of things. Then later, the same thing for my RHEL machines needs to be done.
I’m assuming that there are several different ways to approach this situation, but I lack the tech-fu to do so (and the Mac to test on, I know, I complain about this to my management EVERY TIME). Here is an example of what I use on the Windows side:
unique values of ((
if (exists value
"DisplayName" of it AND exists value
"DisplayName" of it as string) then (value
"DisplayName" of it as string)
else (
"")) & (
if (exists value
"DisplayVersion" of it) then (
" | " & value
"DisplayVersion" of it as string)
else (
""))) of keys whose (exists value
"UninstallString" of it AND (not exists value
"SystemComponent" of it) OR (exists value
"SystemComponent" of it AND name of it starts with
"{" AND name of it contains
"}" AND (exists match (regex
"(9|A|B|C)(0|1)1(2|4)\d\d\d\d-(0011|0012|0013|0014|0017|002E|002F|0030|0031|0033|0035|003A|003B|0044|0051|0052|0053|0057|00BA|00CA|10D7|110D)-(0000|0409)-(0|1)000-(0|1)000000FF1CE$") of preceding text of first
"}" of following text of first
"{" of name of it)) AND (it does not contain
"Hotfix" AND it does not contain
"Security Update for" AND it does not contain
"Update for" AND it does not contain
"Security Update for Windows" AND it does not contain
"Update for Windows" AND it does not contain
"Security Update for Microsoft" AND (length of it > 0) AND (number of substrings
" " of it < length of it)) of (value
"DisplayName" of it as string)) of keys
"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of (
if x64 of operating system then (x32 registry; x64 registry)
else registry)
In addition, I don’t have the Software Asset tracking module for BigFix, so that’s sort of out of the question. I’m not permitted to use a different tool to track licenses and tracking (it was hard enough to get BigFix where I have it now). I mainly use this for compliance to make sure mouth breathers are not installing software they shouldn’t be installing.
I’m not sure if the easiest approach would be to have the Mac analysis return a list of the directories or what… Anyways, any help would be greatly appreicated.
EDIT:
I may have an answer from digging around elsewheres.