How do I get a list of installed updates and hotfixes?

后端 未结 5 1795
盖世英雄少女心
盖世英雄少女心 2020-11-30 05:16

A list of every update and hotfix that has been installed on my computer, coming from either Microsoft Windows Update or from the knowledge base. I need the ID of each in th

5条回答
  •  情话喂你
    2020-11-30 05:52

    const string querys = "SELECT HotFixID FROM Win32_QuickFixEngineering";
    var search = new ManagementObjectSearcher(querys);
    var collection = search.Get();
    
    foreach (ManagementObject quickfix in collection)
    {
        hotfix = quickfix["HotFixID"].ToString();
    }
    
    listBox1.Items.Add(hotfix);
    

    This will populate the listbox with currently installed Hotfixes or Updates

    If you want to list all history of updates and hotfixes to show then, the above example of Tom Wijsman as stated will work

提交回复
热议问题