我试图找到适用于给定系统的更新?我看到WUA Api电话页面。我想知道Windows更新代理如何工作? Windows如何确定需要安装哪些KB?是否有像注册表这样的中心位置,我知道安装了不同的组件或默认版本信息?然后决定补丁?
例如,要安装dot net KB或IE KB,我如何在系统上首先找到dot net,IE,vbscript等组件?
任何的想法?
客户端中的WUA API的IUpdateSearcher
接口调用远程通信协议(基于SOAP XML over HTTP),该协议与Windows Update Server或WSUS通信。该协议的一部分涉及将OS配置数据和已安装的更新(和硬件)的分类列表传输到服务器。请参阅此通信协议的RegisterComputer
和SynchUpdates
消息,其描述如下:
https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-WUSP/%5bMS-WUSP%5d.pdf
根据客户端向更新服务器提供的这些消息中提供的信息,服务器将回复SyncUpdates Response
消息中适用更新的列表。
...如果WUA通过WSUSSCN2.CAB
API方法使用本地IUpdateServiceManager.AddScanPackageService()
扫描包来离线发现适用的更新,那么它将使用此包中包含的XML文件来确定适用性。例如,请参阅下面<upd:ApplicabilityRules>
文件片段中的XML标签<upd:IsInstallable>
和WSUSSCN2.CAB
:
<upd:Update xmlns:pub="http://schemas.microsoft.com/msus/2002/12/Publishing" xmlns:cmd="http://schemas.microsoft.com/msus/2002/12/UpdateHandlers/CommandLineInstallation" xmlns:bar="http://schemas.microsoft.com/msus/2002/12/BaseApplicabilityRules" xmlns:lar="http://schemas.microsoft.com/msus/2002/12/LogicalApplicabilityRules" xmlns:upd="http://schemas.microsoft.com/msus/2002/12/Update">
<upd:UpdateIdentity UpdateID="e55001a2-1fdd-4472-9c3c-b1e301460985" RevisionNumber="106" />
<upd:Properties DefaultPropertiesLanguage="en" UpdateType="Software" Handler="http://schemas.microsoft.com/msus/2002/12/UpdateHandlers/CommandLineInstallation" PublicationState="Published" CreationDate="2009-04-27T21:44:22.464Z" PublisherID="395392a0-19c0-48b7-a927-f7c15066d905" MaxDownloadSize="6528440" MinDownloadSize="0">
<upd:InstallationBehavior RebootBehavior="CanRequestReboot" />
<upd:Language>zh-cn</upd:Language>
</upd:Properties>
<upd:LocalizedPropertiesCollection>
<upd:LocalizedProperties>
<upd:Language>en</upd:Language>
<upd:Title>CHS</upd:Title>
</upd:LocalizedProperties>
</upd:LocalizedPropertiesCollection>
<upd:Relationships>
<upd:Prerequisites>
<upd:AtLeastOne>
<upd:UpdateIdentity UpdateID="5b56a815-2aef-40dc-9960-36bac15d1818" />
<upd:UpdateIdentity UpdateID="cf3b8086-5954-4857-b492-339cbdeba89b" />
</upd:AtLeastOne>
<upd:AtLeastOne>
<upd:UpdateIdentity UpdateID="59653007-e2e9-4f71-8525-2ff588527978" />
<upd:UpdateIdentity UpdateID="aabd43ad-a183-4f0b-8eee-8dbbcd67687f" />
<upd:UpdateIdentity UpdateID="3e0afb10-a9fb-4c16-a60e-5790c3803437" />
</upd:AtLeastOne>
<upd:AtLeastOne>
<upd:UpdateIdentity UpdateID="3b4b8621-726e-43a6-b43b-37d07ec7019f" />
<upd:UpdateIdentity UpdateID="dbf57a08-0d5a-46ff-b30c-7715eb9498e9" />
<upd:UpdateIdentity UpdateID="26997d30-08ce-4f25-b2de-699c36a8033a" />
</upd:AtLeastOne>
</upd:Prerequisites>
</upd:Relationships>
<upd:ApplicabilityRules>
<upd:IsInstalled>
<lar:And xmlns:lar="http://schemas.microsoft.com/msus/2002/12/LogicalApplicabilityRules">
<bar:FileExists Path="Microsoft.NET\Framework\v1.0.3705\System.Web.dll" Csidl="36" xmlns:bar="http://schemas.microsoft.com/msus/2002/12/BaseApplicabilityRules" />
<bar:FileVersion Path="Microsoft.NET\Framework\v1.0.3705\System.Web.dll" Comparison="GreaterThanOrEqualTo" Version="1.0.3705.6060" Csidl="36" xmlns:bar="http://schemas.microsoft.com/msus/2002/12/BaseApplicabilityRules" />
<bar:RegKeyExists Key="HKEY_LOCAL_MACHINE" Subkey="Software\Microsoft\Active Setup\Installed Components\{3351022E-A2D8-4B52-B84D-491279866457}" RegType32="true" xmlns:bar="http://schemas.microsoft.com/msus/2002/12/BaseApplicabilityRules" />
</lar:And>
</upd:IsInstalled>
<upd:IsInstallable>
<lar:And xmlns:lar="http://schemas.microsoft.com/msus/2002/12/LogicalApplicabilityRules">
<bar:RegKeyExists Key="HKEY_LOCAL_MACHINE" Subkey="Software\Microsoft\Active Setup\Installed Components\{3351022E-A2D8-4B52-B84D-491279866457}" RegType32="true" xmlns:bar="http://schemas.microsoft.com/msus/2002/12/BaseApplicabilityRules" />
<lar:Not>
<bar:RegDword Key="HKEY_LOCAL_MACHINE" Subkey="SYSTEM\WPA\TabletPC" Value="Installed" Comparison="EqualTo" Data="1" xmlns:bar="http://schemas.microsoft.com/msus/2002/12/BaseApplicabilityRules" />
</lar:Not>
<lar:Not>
<bar:RegDword Key="HKEY_LOCAL_MACHINE" Subkey="SYSTEM\WPA\MediaCenter" Value="Installed" Comparison="EqualTo" Data="1" xmlns:bar="http://schemas.microsoft.com/msus/2002/12/BaseApplicabilityRules" />
</lar:Not>
</lar:And>
</upd:IsInstallable>
</upd:ApplicabilityRules>
<upd:Files>
<upd:File Digest="oYIv8m/lHbAFWB1MhR14EjvPIzc=" DigestAlgorithm="SHA1" FileName="NDP1.0sp3-KB928367-X86-Chs.exe" Size="6528440" Modified="2007-06-29T14:59:22.47" />
</upd:Files>
<upd:HandlerSpecificData xsi:type="cmd:CommandLineInstallation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pub="http://schemas.microsoft.com/msus/2002/12/Publishing">
<cmd:InstallCommand Arguments="-q" Program="NDP1.0sp3-KB928367-X86-Chs.exe" RebootByDefault="false" DefaultResult="Failed" xmlns:cmd="http://schemas.microsoft.com/msus/2002/12/UpdateHandlers/CommandLineInstallation">
<cmd:ReturnCode Reboot="false" Result="Succeeded" Code="0" />
<cmd:ReturnCode Reboot="true" Result="Succeeded" Code="3010" />
<cmd:ReturnCode Reboot="true" Result="Succeeded" Code="1641" />
</cmd:InstallCommand>
</upd:HandlerSpecificData>
补充说明:
用水户协会不将其数据库保存在登记处。它将它保存在JetBlue ESE数据库文件中:%SystemRoot%\SoftwareDistribution\DataStore\DataStore.edb
。
用水户协会不会通过知识库(KB)编号来识别更新,而是通过基于SHA1的GUID来识别,如下所示:“5b56a815-2aef-40dc-9960-36bac15d1818”。
您可以在上面的XML片段中看到这些GUID,您可以通过WUA API IUpdate.get_Identity()
获取它们。