how to get list of installed programs into my listbox ...

Recommended Answers

All 5 Replies

here is a small solution..


write following on Form_Load event.. first Import

Imports Microsoft.Win32

then on Form Load event

Dim SoftwareKey As String = "SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products"
        Dim rk As RegistryKey = 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
            sname = Registry.LocalMachine.OpenSubKey(SoftwareKey).OpenSubKey(skname).OpenSubKey("InstallProperties").GetValue("DisplayName")
            ListView1.Items.Add(sname)

        Next

        ListView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent)

thanks... it works

mark the thread solved if worked

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.