Read registry problem

Rémi remi_inconnu at yahoo.fr
Wed Aug 7 09:34:52 CEST 2002


I want to read a registry the next lines works well:
   reg = OpenKey(HKEY_CLASSES_ROOT,"")
   exefile = QueryValue(reg, "htmlfile\\shell\\open\\command")

but the next lines ares problems (WindowsError [Errno 13] : Invalid data)
   reg = OpenKey(HKEY_CLASSES_ROOT,"")
   exefile = QueryValue(reg, "xmlfile\\shell\\Open\\command")

The difference in registry is that the first key has a type of REG_SZ but
the second key has a type of REG_EXPAND_SZ. I have tried to change
QueryValue by QueryValueEx but the error is  [Errno 2] file not found.
What is the solution ?.



More information about the Python-list mailing list