Results 1 to 3 of 3

Thread: Registry Key Reading Problem (Default) value * Resolved *

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2001
    Posts
    244

    Registry Key Reading Problem (Default) value * Resolved *

    Ok here is a good one.

    This code will read any registry key \ value and return it as an object. However every registry key has a "(Default)" value in it that gets created when you make the key. The data I need to pull is in there. Anyone know the syntax?

    I tried "Default" and "(Default)" neither work.

    VB Code:
    1. Dim MDACVer As RegistryKey = Registry.ClassesRoot.OpenSubKey("MDACVer.Version\CurVer\")
    2.         Dim strMDACVer As Object = MDACVer.GetValue("(Default)")
    3.         MessageBox.Show(strMDACVer)
    Last edited by jlegan; May 22nd, 2003 at 01:14 PM.

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    You pass a blank string.

    VB Code:
    1. Dim MDACVer As RegistryKey = Registry.ClassesRoot.OpenSubKey("MDACVer.Version\CurVer\")
    2.         Dim strMDACVer As Object = MDACVer.GetValue([b]String.Empty[/b])
    3.         MessageBox.Show(strMDACVer)

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2001
    Posts
    244
    Yea just realized that. Thanks for the help. I wish I would just stop trying to make everything so complicated

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