Programmatically Find All Registry Entries

G

Guest

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.
 
M

Mythran

eSolTec said:
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
 
G

GhostInAK

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
 
G

Gary Chang[MSFT]

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/library/microsoft.win32.registrykey.getsubk
eynames.aspx

RegistryKey.GetValueNames Method
http://msdn2.microsoft.com/en-us/library/microsoft.win32.registrykey.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/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

bypass security in Outlook 3
Check for .NET Installed 11
Check for .NET Framework 2
SPAM 1
Search for Directories/files/Folders 5
Pause and Stop Search 2
Test Post 2
validate email address in input textbox 1

Top