List of all installed applications (XP)?

Guy Lateur guy.lateur at
Thu Jun 23 12:11:36 CEST 2005

Hi all,

I'm trying to generate a (exhaustive) list of all the applications that are 
installed on a user's machine. I've written some code that reads the 
registry ('App Paths'):

appKey = win32api.RegOpenKeyEx(win32con.HKEY_LOCAL_MACHINE, 
'SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths', 0, win32con.KEY_READ)
sklist = win32api.RegEnumKeyEx(appKey)

for skey in sklist:
     print skey[0]

          wPath = win32api.RegQueryValue(appKey, skey[0])
          print '    ' + wPath
     except pywintypes.error,details:
          print '### Error [pywintypes.error]: ' + details[2]


This works, but I was wondering wether that is the best way to go about 
this? Can I be sure it lists *all* the applications? What does it mean when 
a pywintypes.error is thrown (code 13, 'Invalid data')?


More information about the Python-list mailing list