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:
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.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
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.




Reply With Quote