469,902 Members | 2,035 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,902 developers. It's quick & easy.

Programmatically Find All Registry Entries

Thank you in advance for any and all assistance, it is GREATLY appreciated.
I'm wondering if there is a way to duplicate a function in regedit of find
and find next for keywords programmatically, then to list them in a treeview
or listbox?

If so, could someone point me to some code?
--
Michael Bragg, President
eSolTec, Inc.
a 501(C)(3) organization
MS Authorized MAR
looking for used laptops for developmentally disabled.
Oct 11 '06 #1
3 2304

"eSolTec, Inc. 501(c)(3)" <es*****@noemail.nospamwrote in message
news:7D**********************************@microsof t.com...
Thank you in advance for any and all assistance, it is GREATLY
appreciated.
I'm wondering if there is a way to duplicate a function in regedit of find
and find next for keywords programmatically, then to list them in a
treeview
or listbox?

If so, could someone point me to some code?
--
Michael Bragg, President
eSolTec, Inc.
a 501(C)(3) organization
MS Authorized MAR
looking for used laptops for developmentally disabled.
You should be able to build one yourself using the Microsoft.Win32 namespace
(notibly, the Registry classes).

HTH,
Mythran
Oct 11 '06 #2
Hello eSolTec, Inc. 501(c)(3),

Geez. Is there anything you know how to do yourself? It would save us all
a great amount of time if you just asked someone to write your app for you.

-Boo
Thank you in advance for any and all assistance, it is GREATLY
appreciated. I'm wondering if there is a way to duplicate a function
in regedit of find and find next for keywords programmatically, then
to list them in a treeview or listbox?

If so, could someone point me to some code?

Oct 12 '06 #3
Hi Michael,
>I'm wondering if there is a way to duplicate a function in regedit
of find and find next for keywords programmatically, then to list
them in a treeview or listbox?
I am afraid there hasn't been a sample by hand to do this, the general
approach is to enumerate all the registry keys/subkys and their values for
the target data you want to find.

You can use the RegistryKey.GetSubKeyNames to enumerate a specific key
(e.g. HKCU), then enumerate each of its subkey recursively. Once you get a
leaf subkey (which hasn't its own subkeys), you can use the
RegistryKey.GetValueNames to get all of its value names and then use the
RegistryKey.GetValue to retrieve their values.

The following MSDN documentation contains the code snippets on using the
above FCL methods:

RegistryKey.GetSubKeyNames Method
http://msdn2.microsoft.com/en-us/lib...trykey.getsubk
eynames.aspx

RegistryKey.GetValueNames Method
http://msdn2.microsoft.com/en-us/lib...trykey.getvalu
enames.aspx
By the way, if you are not very familiar about how to populate a treeview
control in VB.NET, you can refer to the following samples:

http://abstractvb.com/code.asp?A=967

http://www.startvbdotnet.com/controls/treeview.aspx
I hope the above information helps, if you have any questions or concerns,
please do not hesitate to let me know. I am standing by to help you.

Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Oct 12 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by vadim | last post: by
11 posts views Thread by Josh Flanagan | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.