Results 1 to 8 of 8

Thread: Getting registry names

  1. #1

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539

    Getting registry names

    Hi All, ive coded my app to show all sub keys of a particular key, i would like to know loop through the key and obtain all the names to show in a list box

    Firstly can you pick up the registry item names (there not folders) so that i can display then in a list box ?
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  2. #2

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539
    can any one supply me with some code to loop through the entire registry ? or is it possible to find a particular key within the registry ?
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Basically , you use GetSubKeyNames function for each class in Registery Base Class to get registry Root Names .

    Do the rest of the Root keys like this :
    VB Code:
    1. Dim reg As Registry
    2.         For Each Skey As String In reg.ClassesRoot.GetSubKeyNames()
    3.             Me.ListBox1.Items.Add(Skey)
    4.         Next
    5.  
    6.         For Each Skey As String In reg.CurrentConfig.GetSubKeyNames
    7.             Me.ListBox1.Items.Add(Skey)
    8.         Next
    9.  
    10. .
    11. .
    12. .
    13. etc

  4. #4

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539
    that loops the folders, how do you loop the contents of the folder ?
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  5. #5
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    You need kind of recusive method . I'll see if it's possible though .

  6. #6

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539
    nice one thanks priate this has been pissing me off all day just feel like giving up now, and its not even for a paying customer :O( its just a little app i wanted to write (how annoying)

    thanks for your help
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  7. #7

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539
    It can be done because theres a com object thats doing it
    http://www.componentspace.com/regist...desamples.aspx

    Not worth me buying it, as im giving the app to whom ever wants it, for free
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  8. #8
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    This saved me trying to figure out how to loop throughout the registry . It needs more coding though .
    http://www.developerfusion.com/show/1676/8/ if you have any problem with C# synatx , ask here .

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