Re: _winreg error on open key (64bit) - proper usage of _winreg.DisableReflectionKey

2009-11-18 Thread Brian Curtin
On Tue, Nov 17, 2009 at 19:59, Mark Hammond skippy.hamm...@gmail.comwrote: On 18/11/2009 6:29 AM, Randall Walls wrote: I don't believe so, but it seems like I'm in a catch 22, where I need to _winreg.OpenKey the key first before I can pass it to _winreg.DisableReflectionKey, but it doesn't

_winreg error on open key (64bit) - proper usage of _winreg.DisableReflectionKey

2009-11-17 Thread Randall Walls
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

Re: _winreg error on open key (64bit) - proper usage of _winreg.DisableReflectionKey

2009-11-17 Thread Nick Stinemates
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

Re: _winreg error on open key (64bit) - proper usage of _winreg.DisableReflectionKey

2009-11-17 Thread Randall Walls
I don't believe so, but it seems like I'm in a catch 22, where I need to _winreg.OpenKey the key first before I can pass it to _winreg.DisableReflectionKey, but it doesn't exist, so I can't open it. I did find out that I can open the key using: hKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,

Re: _winreg error on open key (64bit) - proper usage of _winreg.DisableReflectionKey

2009-11-17 Thread Mark Hammond
On 18/11/2009 6:29 AM, Randall Walls wrote: I don't believe so, but it seems like I'm in a catch 22, where I need to _winreg.OpenKey the key first before I can pass it to _winreg.DisableReflectionKey, but it doesn't exist, so I can't open it. I did find out that I can open the key using: hKey =