我想在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");
为什么他们不同?