code: def valuestodict(key):
      
      dict = {}
      size = winreg.QueryInfoKey(key)[1]
      for i in range(size):
          data = winreg.EnumValue(key, i)
          dict[data[0]] = data[1]
      return dict
docs: Convert a registry key's values to a dictionary.