I’m trying to get what software’s installed on my computer as well as the path they’re installed to.
I found a link which provided code to get installed software, but I’m unsure how to get the installation paths, and how to associate a certain path(s) with a particular software package.
# prints out the names of installed software
# just need to find the installtion paths
from Microsoft.Win32 import Registry
products = Registry.ClassesRoot.OpenSubKey("Installer\\Products")
for product_name in products.GetSubKeyNames():
product_key = products.OpenSubKey(product_name)
print product_key.GetValue("ProductName")
As a side note, is there a tutorial/guide somewhere which details how to use the Windows Registry (such as the keys used above)?
After playing around with regedit for a while, I found that installation paths are located at
SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\FoldersIt doesn’t tell me which path is associated with which program, but I can figure that out now that I have the paths.