0

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

2
Contributors
1
Reply
14
Views
4 Years
Discussion Span
Last Post by Begginnerdev
0

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.

Edited by Begginnerdev

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.