I'm trying to read the value of a string, 'Connection', under the registry key
HKEY_Local_Machine\Software\Trebuchet\ServerSetup\Business Process Service
In VB.NET, i'm attempting to read this key using the following code:
Private Function ReadRegistry()
Dim KeyValue As String = ""
Dim regkey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Trebuchet\ServerSetup\Business Process Service", False)
If regkey IsNot Nothing Then KeyValue = CStr(regkey.GetValue("Connection"))
Return KeyValue
End Function
However, when attempting to check the registry, I receive a null for regkey. I've verified that the value is within that key, and have even replaced the text within the OpenSubKey call to be an exact copy of the key name as retrieved from RegEdit, but it seems the VB app can't read it for some reason.
Am I missing something?