I think I might have found a bug in Visual Studio.
The following code should work and doesn't:
My.Computer.Reg istry.LocalMach ine.CreateSubKe y("Software\Dra vet")
My.Computer.Reg istry.LocalMach ine.SetValue("H KEY_LOCAL_MACHI NE\Software\Dra vet",
"loglevel", "1")
My.Computer.Reg istry.LocalMach ine.GetValue("l oglevel")
This code does work:
My.Computer.Reg istry.LocalMach ine.CreateSubKe y("Software\Dra vet")
My.Computer.Reg istry.SetValue( "HKEY_LOCAL_MAC HINE\Software\D ravet",
"loglevel", "1")
My.Computer.Reg istry.LocalMach ine.GetValue("l oglevel")
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" <ben553335@yaho o.com> wrote in message
news:uD3px7ogGH A.5088@TK2MSFTN GP02.phx.gbl...[color=blue]
>I am having a problem creating a registry key. I am using the following
> code:
>
> My.Computer.Reg istry.LocalMach ine.CreateSubKe y("Software\pro gramalpha")
> My.Computer.Reg istry.LocalMach ine.SetValue("l oglevel", "7")
> My.Computer.Reg istry.LocalMach ine.GetValue("l oglevel")
>
> 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
>
>[/color]
The following code should work and doesn't:
My.Computer.Reg istry.LocalMach ine.CreateSubKe y("Software\Dra vet")
My.Computer.Reg istry.LocalMach ine.SetValue("H KEY_LOCAL_MACHI NE\Software\Dra vet",
"loglevel", "1")
My.Computer.Reg istry.LocalMach ine.GetValue("l oglevel")
This code does work:
My.Computer.Reg istry.LocalMach ine.CreateSubKe y("Software\Dra vet")
My.Computer.Reg istry.SetValue( "HKEY_LOCAL_MAC HINE\Software\D ravet",
"loglevel", "1")
My.Computer.Reg istry.LocalMach ine.GetValue("l oglevel")
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" <ben553335@yaho o.com> wrote in message
news:uD3px7ogGH A.5088@TK2MSFTN GP02.phx.gbl...[color=blue]
>I am having a problem creating a registry key. I am using the following
> code:
>
> My.Computer.Reg istry.LocalMach ine.CreateSubKe y("Software\pro gramalpha")
> My.Computer.Reg istry.LocalMach ine.SetValue("l oglevel", "7")
> My.Computer.Reg istry.LocalMach ine.GetValue("l oglevel")
>
> 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
>
>[/color]
Comment