Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: _winreg error on open key (64bit) - proper usage of_winreg.DisableReflectionKey (http://www.velocityreviews.com/forums/t705633-re-_winreg-error-on-open-key-64bit-proper-usage-of_winreg-disablereflectionkey.html)

Nick Stinemates 11-17-2009 07:18 PM

Re: _winreg error on open key (64bit) - proper usage of_winreg.DisableReflectionKey
 
>From _winreg.c:

"Disables registry reflection for 32-bit processes running on a 64-bit OperatingSystem. Will generally raise NotImplemented if executed on a 32-bit Operating System. If the key is not on the reflection list, the function succeeds but has noeffect. Disabling reflection for a key does not affect reflection of any subkeys."

Are there any subkeys which you also need to disable? Parent keys?


On Tue, Nov 17, 2009 at 01:51:12PM -0500, Randall Walls wrote:
> Greetings,
>
> I'm writing a python script to automate creating ODBC connections on a
> Windows2008 Server (64bit) platform. I created an ODBC manually (using the
> GUI), for the purposes of fleshing out the 'check for existing' section of
> the script.
>
> Problem: though I can see the key in regedit
> (HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\DRSQL20 00_muXXXX), calling an
> _winreg.OpenKey returns 'WindowsError: [Error 2] The system cannot find the
> file specified'. Googling the error brought up the possibility that this key
> is being impacted by registry redirection (
> http://mail.python.org/pipermail/pyt...y/008862.html),
> and thus the need to use _winreg.DisableReflectionKey to correct this.
>
> I'm new to using _winreg (but not new to python), and though it sounds
> simple, I can't figure out how to properly use _winreg.DisableReflectionKey
> to make the _winreg.OpenKey work properly, and there is nearly 0
> documentation on how to use _winreg.DisableReflectionKey (though I would be
> happy to write something up if I could figure the damned thing out).
>
> any help is appreciated. Has anyone else run into this before? I realize
> that Server 2008 is new and that _winreg.DisableReflectionKey was just
> added, but I'm still hoping SOMEBODY has run into this before.
>
> Many thanks,
>
> --
> Randall Walls
> Tyler Technologies, Inc


> --
> http://mail.python.org/mailman/listinfo/python-list




All times are GMT. The time now is 10:35 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57