En Mon, 10 Aug 2009 09:47:19 -0300, Kevin Holleran <kdaw...@gmail.com> escribió:
On Fri, Aug 7, 2009 at 2:08 PM, Tim Golden <m...@timgolden.me.uk> wrote:
Kevin Holleran wrote:

hKey = _winreg.OpenKey (keyPath, path, 0, _winreg.KEY_SET_VALUE)
value,type = _winreg.QueryValueEx(hKey, item)
if (value == wrongValue):
      _winreg.SetValue(hKey,'',_winreg.REG_SZ,correctValue)


When I do this I receive the error:

_winreg.SetValue WindowsError: [Error 5] Access Denied

I guess my question is will Windows let me change the registry remotely?
The error is a Windows permission error on the KEY_SET_VALUE. I am running
this as a domain admin on a machine on the domain.  Does the connection
inherit the credentials I am running it under or will I need to pass those
in?  Or does Windows simply not let me change the registry?

Try doing the same interactively with regedt32.exe (logged as the same user). You can check your actual permissions under the Edit menu.
Also, try using KEY_WRITE instead of KEY_SET_VALUE.

--
Gabriel Genellina

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

Reply via email to