如何使用VB.NET获取已安装程序列表 [英] How do I get the Installed Program list with VB.NET

查看:369
本文介绍了如何使用VB.NET获取已安装程序列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

如何创建显示计算机上已安装程序的程序。我试过这段代码,但它没有显示我电脑上安装的所有程序



Hello,
How can I create a program that shows the installed programs on your computer. I tried this code but it does not show all the programs installed in my computer

For Each folders In IO.Directory.GetDirectories("C:\Program Files")
Listbox1.Items.Add(folders.ToString)
Next





请帮助朋友!



please help friends!

推荐答案

您不能依赖目录列出程序。为了列出使用Windows安装程序安装的程序,您需要查询WMI。



看一下这个例子使用vb或c#和wmi获取已安装软件的列表 [ ^ ]
You can't rely on the directories to list the programs. In order to list programs that have been installed using the Windows installer you need to query WMI.

Have a look at this example Get a list of Installed Software using vb or c# and the wmi[^]


这篇关于如何使用VB.NET获取已安装程序列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆