I'm currently testing a new XSLT file to extract Office updates by their Product Ids, rather than the ProductFamily Id:
- Code: Select all
<?xml version="1.0"?>
<!--
Author: H. Buhrmester, 2020
Filename: extract-office-revision-and-update-ids.xsl
This file selects Office updates by their Product Ids:
Office 2010 = 84f5f325-30d7-41c4-81d1-87a0e6535b66
Office 2013 = 704a0a4a-518f-4d69-9e03-10ba44198bd5
Office 2016 = 25aed893-7c2d-4a31-ae22-28ff8ac150ed
It extracts the following fields:
Field 1: Bundle RevisionId
Field 2: UpdateId
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:__="http://schemas.microsoft.com/msus/2004/02/OfflineSync" version="1.0">
<xsl:output omit-xml-declaration="yes" indent="no" method="text"/>
<xsl:template match="/">
<xsl:for-each select="__:OfflineSyncPackage/__:Updates/__:Update/__:Categories/__:Category[@Type='Product']">
<xsl:if test="contains(@Id, '84f5f325-30d7-41c4-81d1-87a0e6535b66')
or contains(@Id, '704a0a4a-518f-4d69-9e03-10ba44198bd5')
or contains(@Id, '25aed893-7c2d-4a31-ae22-28ff8ac150ed')">
<xsl:text>#</xsl:text>
<xsl:value-of select="../../@RevisionId"/>
<xsl:text>#,</xsl:text>
<xsl:value-of select="../../@UpdateId"/>
<xsl:text> </xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
This file is compatible with the existing Windows and Linux scripts. It can replace the existing file in the xslt directory. It removes several old updates like works432, which don't belong to the supported Office versions.
This reduces the number of downloads to:
ofc/glb: 183 files
ofc/enu: 18 files
ofc/deu: 18 files
We can also create three more XSLT files, to select the supported Office versions separately:
- Code: Select all
<?xml version="1.0"?>
<!--
Author: H. Buhrmester, 2020
Filename: extract-o2k10-revision-and-update-ids.xsl
This file selects Office 2010 updates by their Product Id:
Office 2010 = 84f5f325-30d7-41c4-81d1-87a0e6535b66
It extracts the following fields:
Field 1: Bundle RevisionId
Field 2: UpdateId
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:__="http://schemas.microsoft.com/msus/2004/02/OfflineSync" version="1.0">
<xsl:output omit-xml-declaration="yes" indent="no" method="text"/>
<xsl:template match="/">
<xsl:for-each select="__:OfflineSyncPackage/__:Updates/__:Update/__:Categories/__:Category[@Type='Product']">
<xsl:if test="contains(@Id, '84f5f325-30d7-41c4-81d1-87a0e6535b66')">
<xsl:text>#</xsl:text>
<xsl:value-of select="../../@RevisionId"/>
<xsl:text>#,</xsl:text>
<xsl:value-of select="../../@UpdateId"/>
<xsl:text> </xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
- Code: Select all
<?xml version="1.0"?>
<!--
Author: H. Buhrmester, 2020
Filename: extract-o2k13-revision-and-update-ids.xsl
This file selects Office 2013 updates by their Product Id:
Office 2013 = 704a0a4a-518f-4d69-9e03-10ba44198bd5
It extracts the following fields:
Field 1: Bundle RevisionId
Field 2: UpdateId
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:__="http://schemas.microsoft.com/msus/2004/02/OfflineSync" version="1.0">
<xsl:output omit-xml-declaration="yes" indent="no" method="text"/>
<xsl:template match="/">
<xsl:for-each select="__:OfflineSyncPackage/__:Updates/__:Update/__:Categories/__:Category[@Type='Product']">
<xsl:if test="contains(@Id, '704a0a4a-518f-4d69-9e03-10ba44198bd5')">
<xsl:text>#</xsl:text>
<xsl:value-of select="../../@RevisionId"/>
<xsl:text>#,</xsl:text>
<xsl:value-of select="../../@UpdateId"/>
<xsl:text> </xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
- Code: Select all
<?xml version="1.0"?>
<!--
Author: H. Buhrmester, 2020
Filename: extract-o2k16-revision-and-update-ids.xsl
This file selects Office 2016 updates by their Product Id:
Office 2016 = 25aed893-7c2d-4a31-ae22-28ff8ac150ed
It extracts the following fields:
Field 1: Bundle RevisionId
Field 2: UpdateId
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:__="http://schemas.microsoft.com/msus/2004/02/OfflineSync" version="1.0">
<xsl:output omit-xml-declaration="yes" indent="no" method="text"/>
<xsl:template match="/">
<xsl:for-each select="__:OfflineSyncPackage/__:Updates/__:Update/__:Categories/__:Category[@Type='Product']">
<xsl:if test="contains(@Id, '25aed893-7c2d-4a31-ae22-28ff8ac150ed')">
<xsl:text>#</xsl:text>
<xsl:value-of select="../../@RevisionId"/>
<xsl:text>#,</xsl:text>
<xsl:value-of select="../../@UpdateId"/>
<xsl:text> </xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
These files are not integrated in DownloadUpdates.cmd, nor in the Linux download scripts. To use these files with the existing scripts:
- rename the existing file xslt/extract-office-revision-and-update-ids.xsl to extract-office-revision-and-update-ids.xsl.bak
- rename the file you want to use to extract-office-revision-and-update-ids.xsl
- by sure to only select the corresponding Office version in UpdateGenerator.exe
Then we get for Office 2010:
ofc/glb: 72 files
ofc/enu: 14 files
ofc/deu: 14 files
For Office 2013:
ofc/glb: 65 files
ofc/enu: 4 files
ofc/deu: 4 files
For Office 2016:
ofc/glb: 46 files
ofc/enu: 0 files
ofc/deu: 0 files
After each step, I selected 10 random update ids from the temporary file office-update-ids-and-locations.txt and searched them in the Microsoft Update Catalog https://www.catalog.update.microsoft.com/home.aspx. The three Office versions were duly separated, e.g. after selecting the XSLT file extract-o2k13-revision-and-update-ids.xsl, I only got updates for Office 2013.
Caveats: This should work in theory, but I can't verify the installation, because I don't have any version of Microsoft Office.
The Product Ids are from an old post by aker:
https://forums.wsusoffline.net/viewtopic.php?f=3&t=5411&start=10#p17827
It would be interesting to get an updated list of Product and ProductFamily Ids. There is a PowerShell module "Get-WsusProduct", which may somehow retrieve this information:
https://docs.microsoft.com/en-us/powershell/module/updateservices/get-wsusproduct
https://github.com/MicrosoftDocs/windows-powershell-docs/blob/master/docset/winserver2012r2-ps/updateservices/Get-WsusProduct.md
Then maybe, WSUS Offline Update could some day have the same selections as a real WSUS server:
https://www.nextofwindows.com/upgrading-to-windows-10-1903-may-update-via-wsus
https://www.admin-magazine.com/Archive/2017/41/Windows-10-Updates-with-WSUS
However, a complex application logic should not be implemented as a shell script, and certainly not as a cmd.exe batch file.
Regards,
hbuhrmester