Hi Experts,

I would like to seek your help on this. I wish to list all the installed application with icon and path. I saw once in a forum using the System.Management, but unfortunately, I am having trouble upon the execution.

Here's the code:

        Dim moReturn As Management.ManagementObjectCollection
        Dim moSearch As Management.ManagementObjectSearcher
        Dim mo As Management.ManagementObject
        moSearch = New Management.ManagementObjectSearcher("Select * from Win32_Product")
        moReturn = moSearch.Get
        For Each mo In moReturn
            Try
                Debug.Print(mo("InstallLocation"))
                Debug.WriteLine(String.Format("{0} Location {1} ", mo("Name"), mo("InstallLocation")))
                x.WriteLine(String.Format("{0} Location {1} ", mo("Name"), mo("InstallLocation")))
            Catch ex As Exception

            End Try
        Next

Here's the error:

aa198031910ef76047a3422e6a512fa9
Please help me on this.

Thank you and regards

After doing a little searching, I can see that you have used the code from bytes.com.

Here is a lengthy post on VBForumns that may be of some use to you.

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.