win32api question

Bill Tutt billtut at microsoft.com
Wed Dec 15 11:56:49 EST 1999


> -----Original Message-----
> From: tony roth [mailto:roth at teleport.com]
> 
> I do the following
> 
> import win32api
> import win32con
> rk=win32api.RegConnectRegistry('blmw2ktr',win32con.HKEY_LOCAL_MACHINE)
> test=win32api.RegQueryValueEx(rk,"software")
> 


This happens because "HKLM\Software" is a key, and not a value.
If you want the default value assigned to the Software key, then use
RegQueryValue(). If you want to get an HKEY for the Software key then use
RegOpenKeyEx().

Bill




More information about the Python-list mailing list