def _get_reg_software():
 ignore_list = [u'AddressBook', u'Connection Manager', u'DirectDrawEx', u'Fontcore', u'IE40', u'IE4Data', u'IE5BAKEX', u'IEData', u'MobileOptionPack', u'SchedulingAgent', u'WIC', u'Not Found', u'(value not set)', u'', None]
 reg_software = {}
 hive = u'HKLM'
 key = u'Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall'
 def update(hive, key, reg_key, use_32bit):
  d_name = u''
  d_vers = u''
  d_name = __salt__[u'reg.read_value'](hive, u'{0}\\{1}'.format(key, reg_key), u'DisplayName', use_32bit)[u'vdata']
  d_vers = __salt__[u'reg.read_value'](hive, u'{0}\\{1}'.format(key, reg_key), u'DisplayVersion', use_32bit)[u'vdata']
  if (d_name not in ignore_list):
   reg_software.update({d_name: str(d_vers)})
 for reg_key in __salt__[u'reg.list_keys'](hive, key):
  update(hive, key, reg_key, False)
 for reg_key in __salt__[u'reg.list_keys'](hive, key, True):
  update(hive, key, reg_key, True)
 return reg_software

def _get_reg_software ( ) : ignore_list = [ u'AddressBook' , u'Connection Manager' , u'DirectDrawEx' , u'Fontcore' , u'IE40' , u'IE4Data' , u'IE5BAKEX' , u'IEData' , u'MobileOptionPack' , u'SchedulingAgent' , u'WIC' , u'Not Found' , u'(value not set)' , u'' , None ] reg_software = { } hive = u'HKLM' key = u'Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall' def update ( hive , key , reg_key , use_32bit ) : d_name = u'' d_vers = u'' d_name = __salt__ [ u'reg.read_value' ] ( hive , u'{0}\\{1}' . format ( key , reg_key ) , u'DisplayName' , use_32bit ) [ u'vdata' ] d_vers = __salt__ [ u'reg.read_value' ] ( hive , u'{0}\\{1}' . format ( key , reg_key ) , u'DisplayVersion' , use_32bit ) [ u'vdata' ] if ( d_name not in ignore_list ) : reg_software . update ( { d_name : str ( d_vers ) } ) for reg_key in __salt__ [ u'reg.list_keys' ] ( hive , key ) : update ( hive , key , reg_key , False ) for reg_key in __salt__ [ u'reg.list_keys' ] ( hive , key , True ) : update ( hive , key , reg_key , True ) return reg_software
this searches the uninstall keys in the registry to find a match in the sub keys .