Results 1 to 6 of 6

Thread: [Resolved] reading reg values

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    11

    Resolved [Resolved] reading reg values

    I'm attempting to write an application which reads all sub keys from

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\

    I am managing to retrieve all the subkey names fine, however when I want to retrieve a value from within this I get nothing.

    My code is as follows:
    Code:
    Dim regkey As RegistryKey
            regkey = Registry.LocalMachine.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Uninstall\", True)
            Dim key As String
            Dim test As String
            For Each key In regkey.GetSubKeyNames()
                test = CType(regkey.GetValue(key & "\InstallDate"), String)
                TextBox2.Text = TextBox2.Text & vbCrLf & key & " - '" & test & "'"
            Next
    I've only tried the CType bit as I read that you need to convert a registry value to string to be able to read it.

    A result is as follows

    CNXT_MODEM_HDAUDIO_VEN_14F1&DEV_2BFA&SUBSYS_14F100C3 - ''
    Combined Community Codec Pack_is1 - ''
    Connection Manager - ''
    DirectAnimation - ''
    DirectDrawEx - ''
    DXM_Runtime - ''

    some of these obviously dont have a value for InstallDate however I know for sure that the Combined Community Codec Pack_is1 has a value for this.

    Any help is gratefully appreciated.
    Last edited by peteoc; Feb 27th, 2007 at 08:34 AM. Reason: Resolved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width