通过使用Win32_QuickFixEngineering和UpdateSearchResult,为什么修补程序结果不同

时间:2013-12-14 15:28:08

标签: c# windows hotfix

我想在C#中安装我的计算机上的修补程序,当我通过Win32_QuickFixEngineering使用wmi时,我的计算机上安装了33个修补程序。但是当我通过IUpdateSearcher使用WUApiLib时,我的计算机上安装了19个修补程序。我发现有2个修补程序在19中但不在33中。

方法1:wmi

ManagementObjectSearcher hotfixmos = new ManagementObjectSearcher("Select * from Win32_QuickFixEngineering");

方法2:WUApi

UpdateSession UpdateSession = new UpdateSession();
IUpdateSearcher UpdateSearchResult = UpdateSession.CreateUpdateSearcher();
UpdateSearchResult.Online = false;
ISearchResult SearchResults = UpdateSearchResult.Search("IsInstalled=1");

为什么他们不同?

0 个答案:

没有答案