[python-win32] Access is denied while retriving 64 bit registry from 32bit

Tim Roberts timr at probo.com
Tue Jul 29 19:33:01 CEST 2008


siddhartha veedaluru wrote:
>  
> i modified the script and once again i ran it
> import os, sys
> from _winreg import *
> KEY_WOW64_64KEY = 256
> regHandle = OpenKey(HKEY_LOCAL_MACHINE,"SOFTWARE\Value 
> Systems\ValApp\Instance001",0,KEY_WOW64_64KEY|KEY_READ|KEY_WRITE)
> print regHandle
> val = QueryValue(regHandle,"sPhysicalNodeName")
> print val
>  
> it gave the following window error.but the registry value is present.
>  
> <PyHKEY at 01F650B0 (00000080)>
> Traceback (most recent call last):
>   File "C:\Precert\test.py", line 6, in <module>
>     val = QueryValue(regHandle,"sPhysicalNodeName")
> WindowsError: [Error 2] The system cannot find the file specified

Well, this makes the pretty strong argument that the "Value
Systems\ValApp\Instance001" key in your 64-bit HKLM hive does not
contain a value called "sPhysicalNodeName".

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.




More information about the python-win32 mailing list