I’m working on pulling accurate Installed Applications information for Windows and macOS (because RegApps is useless ) and I’ve found something interesting that’s alternately useful and annoying. Consider the following relevance:
(names of it) of keys of keys "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of (x32 registries; x64 registries)
This gives me a long list of 150 Registry Key names. Now consider this slightly modified version:
(names of it, values "Installed" of it as string) of keys of keys "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of (x32 registries; x64 registries)
This gives me 10 results…the 10 keys that actually have a value of “Installed”.
I’ve been using the “plurals everywhere” trick to avoid errors where something does not exist, but it does not seem to be working (or applicable) in this instance. How would I get all 150 Key names with a blank or null or something for those that do not actually have a value of “Installed”?
(Alternatively, this “feature” has turned out to be useful when looking for this same information on macOS. Applications on macOS are just special folders with a “.app” extension. Consider the following relevance:
(names of it as string, versions of it as string) of folders of (folders "/Applications"; folders "/System/Applications"; folders of (folders "/Applications"; folders "/System/Applications"))
This captures macOS Apps that are located at the root of the Applications folders or one level deeper, but it ignores those “normal” subfolders that contain Apps because the subfolders lack a “version”. Handy that I don’t have to manually exclude them, but now I may be missing a poorly written App that doesnt have a proper Version.)