获取Windows中已安装软件的列表. [英] Get list of installed Software in windows.

查看:226
本文介绍了获取Windows中已安装软件的列表.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够从注册表的以下路径获取软件列表.但是,许多软件名称并非来自此路径.如何获取软件的上次访问日期.很久以来,我一直在寻找正确的解决方案,但我一直没有.

HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ App路径



任何想法敬请分享.

I am able to the software list from this following path of the registry. But many software names are not coming from this path. How to get Last access date of a software. I have been looking for a right solution for a long time but I could not.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths



any idea Kindly share.

推荐答案

类似(或完全)问题,并在此处进行长时间讨论:如何使用System.io获取和设置文件的上次访问时间和日期c#(.net 2.0). [^ ]
Similar(or Exact) question and long discussion here: Last accessed date and time of all the installed software[^]

You can interact with the answerer there if needed.


Also, look at the following link: How to Get and Set file Last Access Time and Date using System.io in c# (.net 2.0).[^]


看看Windows Management Instrumentation ^ ]

并使用从Win32_Product中选择*"在WMI中进行查询

Take a look at Windows Management Instrumentation WMI Tasks: Computer Software[^]

And make at WMI query with "Select * from Win32_Product"

WqlObjectQuery wqlQuery = new WqlObjectQuery("SELECT * FROM Win32_Product");
ManagementObjectSearcher searcher = new ManagementObjectSearcher(wqlQuery);
foreach (ManagementObject row in searcher.Get())
{
  object name = row["Name"];
  object version = row["Version"];
  Console.WriteLine("Name: " + name + " - Version: " + version);
}


这篇关于获取Windows中已安装软件的列表.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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