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:
Please help me on this.
Thank you and regards