Over the years I have been asked many times how to 'discover' if a certain Software Delivery package is already installed on a system by some other means. This question has also been asked on this forum several times. Historically I have pointed to a VERY old and extremely poorly documented method known as 'Software Detection Scripts' and provided a document for it which I wrote way back in 2002. This method is rather unsophisticated and clumsy so in response to a client recently asking me the question yet again, I decided to put some effort into providing a better method.
It occurred to me that since the Software Inventory scanner (both signature and heuristic) write their results to easily readable files, I could write a script which maps these results to SD Software packages, and adds or removes them from the SD Installed packages records using SD_ACMD AddInstallRecord/AddUninstallRecord commands, so I set out to do just that.
Since we don't necessarily want ALL discovered software to be added as installed packages, I wrote the script to read a 'mapping' file which allows us to specify which discovered software should be mapped to installed packages. The mapping file is maintained using a 'secure configuration file' type job which makes it very simple to maintain.
The script keeps a record of which packages were previously found (SWPkgs.TXT), so that it is not continuously adding installation records and to add an UnInstallation Record when the software is removed. It also writes a log file (SD_Detect.Log) for debugging purposes. These files are located in the computer's collect directory, usually C:\Program Files (x86)\CA\DSM\Agent\units\00000001\uam.
I hope you find this useful.