Results 1 to 3 of 3

Thread: [RESOLVED] Check if registry key exists.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2006
    Posts
    66

    Resolved [RESOLVED] Check if registry key exists.

    Hi, after many googles I cant figure out how to check if a regitry key exists. And if it soes exists, get its value.

    Just so there is no confusion, I have attached a SS. im not sure if "key" is the correct term for the think that i want to find.


  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Check if registry key exists.

    That's a value, not a key. You would open the key and then try to get the value with an empty string as a name. If myRegistryKey.GetValue(string.Empty) returns null then no default value has been set.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2006
    Posts
    66

    Re: Check if registry key exists.

    Thanks.

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