Here it is:
vb Code:
Public Sub UninstallPrograms() 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products Dim SoftwareKey As String = "SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products" Using rk As RegistryKey = Registry.LocalMachine.OpenSubKey(SoftwareKey) For Each skName In rk.GetSubKeyNames() Dim propertiesKey As RegistryKey = Registry.LocalMachine.OpenSubKey(SoftwareKey, False). _ OpenSubKey(skName, False). _ OpenSubKey("InstallProperties", False) Dim name = propertiesKey.GetValue("DisplayName", "<DisplayName not found>") Dim publisher = propertiesKey.GetValue("Publisher", "<Publisher not found>") Dim DisplayVersion = propertiesKey.GetValue("DisplayVersion", "<Display Version not found>") Dim installLocation = propertiesKey.GetValue("InstallLocation", "<InstallLocation not found>") propertiesKey.Close() Next End Using End Sub




Reply With Quote