read NT registry with python

tiddlerdeja at my-deja.com tiddlerdeja at my-deja.com
Wed Mar 15 09:44:15 EST 2000


Thanks for that, very much appreciated.

However, the second line:
    win32api.RegQueryValueEx('AdminPassword')

I get an error with this:

>>> win32api.RegQueryValueEx('AdminPassword')
Traceback (innermost last):
  File "<stdin>", line 1, in ?
TypeError: RegQueryValueEx requires exactly 2 arguments; 1 given

Any help with this is greatly appreciated.

p.s. I realise this is lame me asking this, but I'm new to registry
terms and I don't know what the second var should be.


In article <8anvhr$1756 at newton.cc.rl.ac.uk>,
"Richard Brodie" <R.Brodie at rl.ac.uk> wrote:
>
> <tiddlerdeja at my-deja.com> wrote in message news:8ansn6
$ece$1 at nnrp1.deja.com...
>
> > [HKEY_LOCAL_MACHINE\SOFTWARE\WOF]
> >
> > [HKEY_LOCAL_MACHINE\SOFTWARE\ABC\PlusSoftware]
> > "AdminPassword"="Admin"
>
> import win32api
> from win32con import *
>
> k=win32api.RegOpenKeyEx(HKEY_LOCAL_MACHINE,
> 'SOFTWARE\\ABC\\PlusSoftware',0,KEY_QUERY_VALUE)
>
> win32api.RegQueryValueEx('AdminPassword')
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list