As already mentioned, a list of (correctly) installed programs can be found in the registry under the key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
See here or use Google for more information. Look at this key using regedit , the structure identifier is pretty obvious.
To access the registry using python, see _ winreg - access to the Windows registry in the python standard library documentation.
Please note that there may always be software that does not appear in the registry: some software can still be installed by simply placing it in a directory, you will not catch these guys ...
In the second part, there is no way to report the type of license or licensing status (i.e., properly licensed) from viewing the registry. There is no standard way to store this information. The best thing you can do is make a list of many programs that you can (you have to do it manually, which will take a lot of time even for standard programs such as Office, Adobe, etc.) And store all the necessary information ( i.e. GUID key in the registry, type of license, etc.) in the database.
Then your tool can compare the list of installed programs with your list, perhaps by checking the licensing status. This will be even more difficult than the first step, since each software has its own (mostly secret) way of storing it - because if this information is available, it can also be faked.
Then your tool could inform the system administrator about its findings and about any programs that are not in the list, it will have to manually check the license. You can provide some organizational assistance to manage this information, and possibly even update the database for future use.
NTN
Martin
source share