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
)
精彩评论