954,515 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?

Listing All The Installed Softwares In Computer Using .Net

0
By sandeepparekh9 on Jun 2nd, 2011 4:19 pm

Listing All The Installed Softwares In Computer Using .Net

Don't Forget to add Imports Microsoft.Win32

for complete thread with screen shots check here: [snipped]

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
 
        Dim SoftwareKey As String = "SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products"
        Dim rk As RegistryKey
        rk = Registry.LocalMachine.OpenSubKey(SoftwareKey)
        Dim skname As String
        Dim sname As String = String.Empty
 
        Dim ListView1 As New ListView
        Me.Controls.Add(ListView1)
        ListView1.Dock = DockStyle.Fill
 
        ListView1.View = View.Details
        ListView1.Columns.Add("Installed Software")
 
        For Each skname In rk.GetSubKeyNames
            Try
                sname = Registry.LocalMachine.OpenSubKey(SoftwareKey).OpenSubKey(skname).OpenSubKey("InstallProperties").GetValue("DisplayName")
                ListView1.Items.Add(sname)
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        Next
 
        ListView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent)
 
    End Sub

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You