Results 1 to 3 of 3

Thread: [RESOLVED] Reading Registry Key

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337

    Resolved [RESOLVED] Reading Registry Key

    I am trying to loop through a key to get all values. For some reason this returns nothing

    Code:
    Dim RegKey2 As RegistryKey = Registry.LocalMachine.OpenSubKey("Software\Company\Startup")
            Dim subname() = RegKey2.GetSubKeyNames
            MsgBox(subname.Length)
    Yes, the key is there and it has 2 values in it. What am I doing wrong?

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337

    Re: Reading Registry Key

    Actually I see one problem. If I take Startup off the path it finds Startup. So how do I open Startup and get the values in that?

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337

    Re: Reading Registry Key

    ok, nevermind, found my problem.

    used
    Code:
    Dim subname() = RegKey2.GetValueNames
    Instead, works better.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width