WindowsWithin the registry hive of: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
For each item that has "DisplayName" and "Version", those applications are considered installed and will be used within the results
A Microsoft patch is also detected here using the same keys, but validates that the Publisher is "Microsoft" and that the "DisplayName" contains "KB" in order for it to be a Microsoft KB Patch
*NixEach distribution has its own command for this
RPM | /bin/rpm -qa |
HP-UX | /usr/sbin/swlist -l product |
Debian | /usr/bin/dpkg -l |
AIX | /usr/bin/lslpp -Lc |