Hello I am aware that the registry class exists for vb.net but am a bit confused as to how its possible to enumerate all levels to a label or textbox in succession one key after another like a virus scanner iterating over a filesystem.
I have been trying to use this bit of code that I have found can anyone shed a bit of knowledge on this?
Public Function GetAllChildSubKeys(ByVal MainKey As RegistryKey, ByVal sKey As String) As ArrayList
Dim rkKey As RegistryKey
Dim sSubKeys() As String
Dim arySubKeys As New ArrayList
Try
rkKey = MainKey.OpenSubKey(sKey)
If Not sKey Is Nothing Then
sSubKeys = rkKey.GetSubKeyNames
For Each s As String In sSubKeys
arySubKeys.Add(s)
Next
Else
Throw New Exception("The SubKey provided doesn't exist. Please check your entry and try again.")
End If
Catch ex As Exception
MessageBox.Show(ex.Message, "Error: Retrieving SubKeys", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
Return arySubKeys
End Function
Thank you in advance!!