Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Writing to Registry

Reply
Thread Tools

Writing to Registry

 
 
Samantha
Guest
Posts: n/a
 
      11-16-2006
I am working with this recipes:
http://aspn.activestate.com/ASPN/Coo...n/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)
Help would be appreciated.
S


 
Reply With Quote
 
 
 
 
Gabriel Genellina
Guest
Posts: n/a
 
      11-17-2006
At Thursday 16/11/2006 20:48, Samantha wrote:

>I am working with this recipes:
>http://aspn.activestate.com/ASPN/Coo...n/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
 
Reply With Quote
 
 
 
 
Samantha
Guest
Posts: n/a
 
      11-17-2006
Thanks for the link.
S
"Gabriel Genellina" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> At Thursday 16/11/2006 20:48, Samantha wrote:
>
>>I am working with this recipes:
>>http://aspn.activestate.com/ASPN/Coo...n/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



 
Reply With Quote
 
Mark Elston
Guest
Posts: n/a
 
      11-17-2006
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):
> I am working with this recipes:
> http://aspn.activestate.com/ASPN/Coo...n/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)
> Help would be appreciated.
> S
>
>

 
Reply With Quote
 
Gabriel Genellina
Guest
Posts: n/a
 
      11-17-2006
At Thursday 16/11/2006 21:39, Samantha wrote:

> > http://docs.python.org/lib/module--winreg.html#l2h-5827

>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
 
Reply With Quote
 
Samantha
Guest
Posts: n/a
 
      11-17-2006
That was the fix.
S

"Mark Elston" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Note: this is untested (since I don't like screwing around
> in the registry...)
>
> Have you tried using REG_DWORD?
>
> Mark
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help:win95 registry vs. winxp registry wege Computer Support 3 06-09-2006 06:28 PM
How to read a registry key from Windows registry ? Leny Java 3 02-01-2005 07:54 AM
Interpretation of registry log of tweakui produced registry alteration vincemoon@rcn.com ASP .Net 0 01-10-2005 02:53 AM
Reading registry key throws "Requested registry access is not allowed." HK ASP .Net 1 04-01-2004 04:44 PM



Advertisments