Home All Groups Group Topic Archive Search About
Author
28 May 2006 7:43 PM
Ben
I am having a problem creating a registry key.  I am using the following
code:

My.Computer.Registry.LocalMachine.CreateSubKey("Software\programalpha")
My.Computer.Registry.LocalMachine.SetValue("loglevel", "7")
My.Computer.Registry.LocalMachine.GetValue("loglevel")

When I run the above code the programalpha key is created.  The loglevel
value (which can hold the value of numbers between 1 and 10) does not get
created.  What am I doing wrong?

Thanks,
Ben

Author
28 May 2006 11:54 PM
IdleBrain
Hai,
Maybe it is getting created in a default location.

See if this helps:
My.Computer.Registry.LocalMachine.CreateSubKey("Software\programalpha")
My.Computer.Registry.LocalMachine.SetValue("Software\programalpha\loglevel",
"7")
My.Computer.Registry.LocalMachine.GetValue("Software\programalpha\loglevel")


Just a thought..
Author
29 May 2006 1:27 PM
Ben
Thank you for the suggestion.  It did not work.  Any other ideas?

Thanks,
Ben

Show quoteHide quote
"IdleBrain" <indianmostwan***@yahoo.com> wrote in message
news:1148860467.889757.34620@g10g2000cwb.googlegroups.com...
> Hai,
> Maybe it is getting created in a default location.
>
> See if this helps:
> My.Computer.Registry.LocalMachine.CreateSubKey("Software\programalpha")
> My.Computer.Registry.LocalMachine.SetValue("Software\programalpha\loglevel",
> "7")
> My.Computer.Registry.LocalMachine.GetValue("Software\programalpha\loglevel")
>
>
> Just a thought..
>