• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 144
  • Last Modified:

Reading from the registry...

I need to get all the sub-entries from an entry in the registry.
Example:
In my "HKEY_CLASSES_ROOT\Word.RTF.8\shell", the sub-entries is:
-New
-open
-print
-printto
-VirusScan

But I need to get(find/extract) them using code. How do I do that?
0
Olli083097
Asked:
Olli083097
  • 3
  • 2
  • 2
1 Solution
 
ChizlCommented:
'to get registry keys use:
Declare Function RegEnumKeyEx Lib "advapi32.dll" _
    Alias "RegEnumKeyExA" (ByVal hKey As Long, _
    ByVal dwIndex As Long, ByVal lpName As String, _
    ByVal cbName As Long) As Long

'to get values use:
Declare Function RegEnumValue Lib "advapi32.dll" _
    Alias "RegEnumValueA" (ByVal hKey As Long, _
    ByVal dwIndex As Long, ByVal lpValueName As String, _
    lpcbValueName As Long, lpReserved As Long, _
    lpType As Long, lpData As Byte, lpcbData As Long) _
    As Long
0
 
ChizlCommented:
If you need more just ask
0
 
caraf_gCommented:
Olli, I asked a very similar question myself recently and had good answers from both Mirkwood and Waty: - here's the URL

http://www.experts-exchange.com/topics/comp/lang/visualbasic/Q.10108254

You'll find it most helpful.
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
Olli083097Author Commented:
caraf_g: Your code was just what I needed! If you want the points, the just answer the question...!
0
 
ChizlCommented:
So you wanted the application written for you not told what you can use..  Ok what ever floats your boat.  What he showed you is using the API I told ya to use.
0
 
Olli083097Author Commented:
Chizl: If it were possible to split the pionts on two persons I would have done it... But he gave me exactly what I needed + a lot more usefull code! Sorry...!
0
 
caraf_gCommented:
Olli, here's a token answer. Thanks. Sorry for the late reply I sadly had to go on holidays. O woe!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now