G
Guest
hello,
i'm having a bit of trouble reading a default value from the registry, and
i'm wondering if anyone else has run into this. this is the code i use
Dim key As Microsoft.Win32.RegistryKey
key =
Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Clients\Mail")
Dim name As String = CType(key.GetValue("(Default)"), String)
MessageBox.Show(name)
this returns a blank string but when i view the view with regedit the
(Default) key has a value (the value is currently Outlook Express. i thought
it might me a problem with the key being with () but if i add a key (testkey)
and assign it a value, then modify my code to key.GetValue("(testkey)"), the
value of the test key shows up .
has anyone else seen this of am i querying the registy incorrectly?
i'm having a bit of trouble reading a default value from the registry, and
i'm wondering if anyone else has run into this. this is the code i use
Dim key As Microsoft.Win32.RegistryKey
key =
Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Clients\Mail")
Dim name As String = CType(key.GetValue("(Default)"), String)
MessageBox.Show(name)
this returns a blank string but when i view the view with regedit the
(Default) key has a value (the value is currently Outlook Express. i thought
it might me a problem with the key being with () but if i add a key (testkey)
and assign it a value, then modify my code to key.GetValue("(testkey)"), the
value of the test key shows up .
has anyone else seen this of am i querying the registy incorrectly?