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

siddhartha veedaluru siddhartha.veedaluru at gmail.com
Tue Jul 29 16:23:40 CEST 2008


Thanks Tim.
Sorry,i was wrong in using the operators

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20080729/52c21cdf/attachment.htm>


More information about the python-win32 mailing list