by Murali Bala (7 Submissions)
Category: Registry
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 29th June 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
ODBC Driver installed in your computer
API Declarations
'An ActiveX Server for Manipulation of the Registry
'http://msdn.microsoft.com/vbasic/downloads/addins/default.asp
Private Sub Form_Load()
Dim key As RegKey
Dim val As RegValue
Set key = RegKeyFromString("\HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers")
For Each val In key.Values
Combo1.AddItem val.Name
Next
GetRegValueInSoftware
End Sub
Private Sub GetRegValueInSoftware()
Dim key1 As RegKey
Dim i As Integer
Dim ic As Integer
'Get the all Subkeys in the HKEY_LOCAL_MACHINE\SOFTWARE section
'You can further drill down the hierarchy.
Set key1 = RegKeyFromHKey(-2147483646)
For i = 1 To key1.SubKeys.Count
If key1.SubKeys(i).Name = "SOFTWARE" Then
For ic = 1 To key1.SubKeys(i).SubKeys.Count
List1.AddItem key1.SubKeys(i).SubKeys(ic).Name
Next
End If
Next
End Sub