I am trying to read a key in the registry but I get nothing in response and I
copied the code from the help files.
Here is the code:
Dim readValue As Object
readValue =
My.Computer.Registry.GetValue("HKEY_CURRENT_USER\MyTestKey", "Name", Nothing)
MsgBox("The value is " & CStr(readValue))
Also, how would you read the other lines in the key as there is no place for
an index?
Any help would be appreciated.
UsualDosage - 30 Aug 2006 22:52 GMT
Dim regKey As RegistryKey
Dim readValue As Object
regKey = Registry.LocalMachine.OpenSubKey("HKEY_CURRENT_USER\MyTestKey", True)
readValue = regKey.GetValue("Name")
regKey.Close()
(See also:
http://msdn2.microsoft.com/en-us/library/microsoft.win32.registrykey.getvalue.aspx)
---
"Quae narravi, nullo modo negabo."
> I am trying to read a key in the registry but I get nothing in response and I
> copied the code from the help files.
[quoted text clipped - 6 lines]
> an index?
> Any help would be appreciated.