windows 更新代理 WUA 如何识别要安装的 KB?

How windows update agent WUA identify KB's to be installed?

我试图找出哪些更新适用于给定系统?我看到 WUA Api 呼叫页面。我想知道 Windows 更新代理是如何工作的? windows 如何决定他们需要安装哪些 KB?有没有像注册表这样的中心位置,我知道安装了不同的组件或默认的版本信息?然后决定补丁?

例如,要安装 dot net KB 或 IE KB,我如何首先在系统上找到 dot net、IE、vbscript 之类的组件?

有什么想法吗?

WUA API 客户端中的 IUpdateSearcher 接口调用远程通信协议(基于 SOAP XML over HTTP)与 Microsoft public 进行通信Windows 更新服务器或使用可选的本地 Windows 服务器更新服务 (WSUS) 服务器。

WSUS 充当 Microsoft public Windows 更新服务器的代理。 WSUS 服务器通过 Internet 从 Windows 更新服务器获取更新并将它们缓存在本地。然后将基于 Intranet 的 PC 配置为从 WSUS 服务器获取更新。 WSUS 服务器的地址是使用以下注册表项配置的:
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\WUServer

该协议的一部分涉及将 OS 配置数据和已安装更新(和硬件)的分类列表传输到服务器。请参阅此通信协议的 RegisterComputerSynchUpdates 消息,这些消息在:
https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-WUSP/%5bMS-WUSP%5d.pdf

根据客户端在这些消息中提供给更新服务器的信息,服务器回复 SyncUpdates Response 留言。

...并且如果 WUA 通过 IUpdateServiceManager.AddScanPackageService() API 方法使用本地离线扫描包 WSUSSCN2.CAB,则无需连接到 Internet 即可发现适用的更新, 然后它使用此包中包含的 XML 文件来确定适用性。例如,请参阅下面 WSUSSCN2.CAB 文件片段中的 XML 标记 <upd:ApplicabilityRules><upd:IsInstallable>

<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>
</upd:Update>

补充说明:
用水户协会不在登记处保留其数据库。它保存在 JetBlue ESE 数据库文件中:%SystemRoot%\SoftwareDistribution\DataStore\DataStore.edb.

WUA 不通过知识库 (KB) 编号识别更新,而是通过基于 SHA1 的 GUID 识别更新,如下所示:“5b56a815-2aef-40dc-9960-36bac15d1818”。
您可以在上面的 XML 片段,您可以通过 WUA API IUpdate.get_Identity().

获得它们