开发者

How to get information of Publisher,InstalledON,Size information of the softwares installed in system

For getting the software names the below program is OK

ManagementObjectSearcher mos = new ManagementObjectSearcher("SELECT * FROM Win32_Product");

foreach (ManagementObject mo in mos.Get())
{
    Console.WriteLine(mo["Name"]);
    Console.WriteLine(开发者_运维技巧mo["Version"]);

}

 Console.ReadKey(true);

But what if I want to get Publisher,InstalledON,Size information of those softwares.. How can I get those?


try mo["InstallDate"] and mo["Vendor"] - I can't seem to find any Size but you could use mo["InstallLocation"] and add the size of its content up (for example using DirectoryInfo anf FileInfo)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜