You're asking for the InstallLocation
value of SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
.
You want the InstallLocation
value of some subkey under SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
.
If you want a particular subkey, just add its name to that path.
If you want all of them, use the EnumKey
function. Something like this:
for i in itertools.count():
try:
subname = EnumKey(akey, i)
except WindowsError:
break
subkey = OpenKey(akey, subname, 0, KEY_READ)
pathname, regtype = QueryValueEx(subkey, "InstallLocation")
print subname, pathname
CloseKey(subkey)