The best registry implementation I've seen is written by Chris Wright (chris128), available at http://www.vbforums.com/showthread.php?t=598355 . It uses several registry keys and is much more complicated than any of the answers posted here. It seems to give identical results to the Add or Remove Programs application and, like the ARP application, also provides the ability to enable updates.
Although implemented in VB.NET, it is easy to convert to other .NET languages such as C # or IronPython. I assume that converting to IronPython should make porting to regular Python fairly simple first if that is what you want, but I only converted it to C # and then cleared the code a bit.
Only one small mistake: GetUserInstallerKeyPrograms () does not add the version for user programs to the list, although it does extract it. It is easy to fix, though.
PolyTekPatrick
source share