如何使用C#获取Windows 7中已安装更新的列表

问题描述:

Microsoft是否从注册表更改了更新的位置?.
我无法获取更新列表..

首选语言是c#

Do Microsoft have changed location of updates from registry?.
I unable to get list of updates..

preferred language is c#

const string query = "SELECT HotFixID FROM Win32_QuickFixEngineering";
var search = new ManagementObjectSearcher(query);
var collection = search.Get();

foreach (ManagementObject quickFix in collection)
    Console.WriteLine(quickFix["HotFixID"].ToString());