Private Function GetRegistryValue(ByVal sKey As String, ByVal sKeyName
As String) As String
Dim reg As RegistryKey
Dim strTemp As String
reg = Registry.CurrentUser.OpenSubKey(sKey)
reg.OpenSubKey(strKey)
If Not (reg Is Nothing) Then
strTemp = reg.GetValue(sKeyName)
reg.Close()
End If
Return strTemp
End Function
I have just coded it for HKEY_CURRENT_USER & it doesn't include any error
trapping, but you get the idea
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.