Writing to Registry

G

Gabriel Genellina

I am working with this recipes:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66011

The problem I am having is setting a hex value.
This line --- SetValueEx(aKey,"MyNewKey",0, REG_SZ,
r"c:\winnt\explorer.exe")
I want something Like -- SetValueEx(aKey,"MyNewSize",0, REG_SZ, 120 or
some value)

Usually when you don't know how to use a certain function, you begin
by reading the documentation for it:
http://docs.python.org/lib/module--winreg.html#l2h-5827


--
Gabriel Genellina
Softlab SRL

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
 
M

Mark Elston

Note: this is untested (since I don't like screwing around
in the registry...)

Have you tried using REG_DWORD?

Mark
* Samantha wrote (on 11/16/2006 3:48 PM):
 
G

Gabriel Genellina

Thanks for the link.

Notice that surely you already have the full Python documentation, it
comes with the standard distribution.


--
Gabriel Genellina
Softlab SRL

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
 
S

Samantha

That was the fix.
S

Mark Elston said:
Note: this is untested (since I don't like screwing around
in the registry...)

Have you tried using REG_DWORD?

Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,701
Latest member
XavierQ83

Latest Threads

Top