The following code should work and doesn't:
My.Computer.Registry.LocalMachine.CreateSubKey("So ftware\Dravet")
My.Computer.Registry.LocalMachine.SetValue("HKEY_L OCAL_MACHINE\Software\Dravet",
"loglevel", "1")
My.Computer.Registry.LocalMachine.GetValue("loglev el")
This code does work:
My.Computer.Registry.LocalMachine.CreateSubKey("So ftware\Dravet")
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\ Software\Dravet",
"loglevel", "1")
My.Computer.Registry.LocalMachine.GetValue("loglev el")
They are equiviant lines of code, so why doesn't the top code work? From
what I can gather from the MSDN website both pieces of code should work.
Thanks,
Ben
"Ben" <be*******@yahoo.com> wrote in message
news:uD**************@TK2MSFTNGP02.phx.gbl...
I am having a problem creating a registry key. I am using the following
code:
My.Computer.Registry.LocalMachine.CreateSubKey("So ftware\programalpha")
My.Computer.Registry.LocalMachine.SetValue("loglev el", "7")
My.Computer.Registry.LocalMachine.GetValue("loglev el")
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