none
Visual Basic写一个程序可以读取出Windows安装的应用程序列表 RRS feed

答案

  • 你好,

    我们可以使用WMI去查询系统中安装的程序列表:

    Private Sub LoadSoftwareList()
            ListBox1.Items.Clear()
            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
                ListBox1.Items.Add(mo("Name").ToString)
            Next
    
        End Sub

    截图:

    你可以从这里下载示例代码:http://code.msdn.microsoft.com/windowsdesktop/Get-a-list-of-Installed-9620d03d


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    2014年9月9日 5:21
    版主