create registry key

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ben

    #1

    create registry key

    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


  • IdleBrain

    #2
    Re: create registry key

    Hai,
    Maybe it is getting created in a default location.

    See if this helps:
    My.Computer.Reg istry.LocalMach ine.CreateSubKe y("Software\pro gramalpha")
    My.Computer.Reg istry.LocalMach ine.SetValue("S oftware\program alpha\loglevel" ,
    "7")
    My.Computer.Reg istry.LocalMach ine.GetValue("S oftware\program alpha\loglevel" )


    Just a thought..

    Comment

    • Ben

      #3
      Re: create registry key

      Thank you for the suggestion. It did not work. Any other ideas?

      Thanks,
      Ben

      "IdleBrain" <indianmostwant ed@yahoo.com> wrote in message
      news:1148860467 .889757.34620@g 10g2000cwb.goog legroups.com...[color=blue]
      > Hai,
      > Maybe it is getting created in a default location.
      >
      > See if this helps:
      > My.Computer.Reg istry.LocalMach ine.CreateSubKe y("Software\pro gramalpha")
      > My.Computer.Reg istry.LocalMach ine.SetValue("S oftware\program alpha\loglevel" ,
      > "7")
      > My.Computer.Reg istry.LocalMach ine.GetValue("S oftware\program alpha\loglevel" )
      >
      >
      > Just a thought..
      >[/color]


      Comment

      Working...