boco wrote:Immer, wenn man denkt, daß MS nicht noch mehr Mist bauen kann...
boco wrote:Immer, wenn man denkt, daß MS nicht noch mehr Mist bauen kann...
# Join the first two files to get the FileIds. The UpdateId of the
# bundle record is copied, because it is needed later to create the
# files UpdateTable-ofc-*.csv.
#
# Input file 1: office-revision-and-update-ids.txt
# - Field 1: RevisionId of the bundle record
# - Field 2: UpdateId of the bundle record
# Input file 2: BundledUpdateRevisionAndFileIds.txt
# - Field 1: RevisionId of the bundle record
# - Field 2: RevisionId of the update record for a single PayloadFile
# - Field 3: FileId of the PayloadFile
# Output
# - Field 1: FileId of the PayloadFile
# - Field 2: UpdateId of the bundle record
echo "Creating file office-file-ids.txt ..."
join -t ',' -o 2.3,1.2 \
office-revision-and-update-ids.txt \
BundledUpdateRevisionAndFileIds.txt \
| sort --unique \
> office-file-and-update-ids.txt
# Join with third file to get the FileLocations (URLs)
#
# Input file 1: office-file-and-update-ids.txt
# - Field 1: FileId of the PayloadFile
# - Field 2: UpdateId of the bundle record
# Input file 2: UpdateCabExeIdsAndLocations.txt
# - Field 1: FileId of the PayloadFile
# - Field 2: Location (URL)
# Output
# - Field 1: UpdateId of the bundle record
# - Field 2: Location (URL)
echo "Creating file office-locations.txt ..."
join -t ',' -o 1.2,2.2 \
office-file-and-update-ids.txt \
UpdateCabExeIdsAndLocations.txt \
| sort --unique \
> office-update-ids-and-locations.txt
grep -F -- "-de-de_" office-update-ids-and-locations.txt > ofc-deu-ids-and-locations.txt
grep -F -- "-en-us_" office-update-ids-and-locations.txt > ofc-enu-ids-and-locations.txt
-af-za_
-am-et_
-ar-sa_
-as-in_
-bg-bg_
-bn-bd_
-bn-in_
-ca-es_
-cs-cz_
-cy-gb_
-da-dk_
-de-de_
-el-gr_
-en-us_
-es-es_
-et-ee_
-eu-es_
-fa-ir_
-fi-fi_
-fil-ph_
-fr-fr_
-ga-ie_
-gl-es_
-gu-in_
-he-il_
-hi-in_
-hr-hr_
-hu-hu_
-hy-am_
-id-id_
-ig-ng_
-is-is_
-it-it_
-ja-jp_
-ka-ge_
-kk-kz_
-km-kh_
-kn-in_
-kok-in_
-ko-kr_
-ky-kg_
-lb-lu_
-lt-lt_
-lv-lv_
-mi-nz_
-mk-mk_
-ml-in_
-mr-in_
-ms-bn_
-ms-my_
-mt-mt_
-nb-no_
-ne-np_
-nl-nl_
-nn-no_
-nso-za_
-or-in_
-pa-in_
-pl-pl_
-pt-br_
-pt-pt_
-quz-pe_
-ro-ro_
-ru-ru_
-si-lk_
-sk-sk_
-sl-si_
-sq-al_
-sv-se_
-sw-ke_
-ta-in_
-te-in_
-th-th_
-tn-za_
-tr-tr_
-tt-ru_
-uk-ua_
-ur-pk_
-vi-vn_
-xh-za_
-yo-ng_
-zh-cn_
-zh-hk_
-zh-tw_
-zu-za_
-az-latn-az_
-bs-latn-ba_
-ha-latn-ng_
-iu-latn-ca_
-sr-cyrl-cs_
-sr-latn-cs_
-uz-latn-uz_
grep -F -v -f locales.txt office-update-ids-and-locations.txt > ofc-glb-ids-and-locations.txt
%SystemRoot%\System32\findstr.exe /L /I /C:"-de-de_" office-update-ids-and-locations.txt > ofc-deu-ids-and-locations.txt
%SystemRoot%\System32\findstr.exe /L /I /C:"-en-us_" office-update-ids-and-locations.txt > ofc-enu-ids-and-locations.txt
%SystemRoot%\System32\findstr.exe /L /I /V /G:"locales.txt" office-update-ids-and-locations.txt > ofc-glb-ids-and-locations.txt
cut -d "," -f "2" ofc-glb-ids-and-locations.txt | sort -u > ofc-glb-locations.txt
cut -d "," -f "2" ofc-deu-ids-and-locations.txt | sort -u > ofc-deu-locations.txt
cut -d "," -f "2" ofc-enu-ids-and-locations.txt | sort -u > ofc-enu-locations.txt
join -v1 ofc-glb-locations.txt ExcludeList-Linux-superseded.txt > ofc-glb-locations-v2.txt
join -v1 ofc-deu-locations.txt ExcludeList-Linux-superseded.txt > ofc-deu-locations-v2.txt
join -v1 ofc-enu-locations.txt ExcludeList-Linux-superseded.txt > ofc-enu-locations-v2.txt
grep -F -v -f ExcludeList-ofc.txt ofc-glb-locations-v2.txt > ofc-glb-locations-v3.txt
grep -F -v -f ExcludeList-ofc.txt ofc-deu-locations-v2.txt > StaticDownloadLinks-ofc-deu.txt
grep -F -v -f ExcludeList-ofc.txt ofc-enu-locations-v2.txt > StaticDownloadLinks-ofc-enu.txt
grep -F -v -f ExcludeList-ofc-glb.txt ofc-glb-locations-v3.txt > StaticDownloadLinks-ofc-glb.txt
<?xml version="1.0"?>
<!--
Author: H. Buhrmester, 2019
Filename: extract-office-revision-and-update-ids.xsl
This file selects Office updates by the ProductFamily Id
"477b856e-65c4-4473-b621-a8b230bb70d9".
The distinction of the categories by type - UpdateClassification,
ProductFamily, Company, Product - is not necessary at this point,
because all UUIDs should be unique by definition.
https://en.wikipedia.org/wiki/Universally_unique_identifier
This xslt file 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[@Id='477b856e-65c4-4473-b621-a8b230bb70d9']">
<xsl:text>#</xsl:text>
<xsl:value-of select="../../@RevisionId" />
<xsl:text>#,</xsl:text>
<xsl:value-of select="../../@UpdateId" />
<xsl:text> </xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
#!/bin/bash
# extract-office-locations-v2.bash
# Sample implementation for the extraction of all Office updates.
set -o errexit
set -o nounset
set -o pipefail
export LC_ALL=C
# Extract File 1, featuring a new xslt file
echo "Extracting office-revision-and-update-ids.txt ..."
xmlstarlet transform \
extract-office-revision-and-update-ids.xsl \
package.xml \
| sort --unique \
> office-revision-and-update-ids.txt
# Extract File 2, using xslt file from the calculation of superseded
# updates
echo "Extracting BundledUpdateRevisionAndFileIds.txt ..."
xmlstarlet transform \
extract-update-revision-and-file-ids.xsl \
package.xml \
| sort --unique \
> BundledUpdateRevisionAndFileIds.txt
# Extract File 3, using xslt file from the calculation of superseded
# updates
echo "Extracting UpdateCabExeIdsAndLocations.txt ..."
xmlstarlet transform \
extract-update-cab-exe-ids-and-locations.xsl \
package.xml \
| sort --unique \
> UpdateCabExeIdsAndLocations.txt
# Join the first two files to get the FileIds. The UpdateId of the
# bundle record is copied, because it is needed later to create the
# files UpdateTable-ofc-*.csv.
#
# Input file 1: office-revision-and-update-ids.txt
# - Field 1: RevisionId of the bundle record
# - Field 2: UpdateId of the bundle record
# Input file 2: BundledUpdateRevisionAndFileIds.txt
# - Field 1: RevisionId of the bundle record
# - Field 2: RevisionId of the update record for a single PayloadFile
# - Field 3: FileId of the PayloadFile
# Output
# - Field 1: FileId of the PayloadFile
# - Field 2: UpdateId of the bundle record
echo "Creating file office-file-and-update-ids.txt ..."
join -t ',' -o 2.3,1.2 \
office-revision-and-update-ids.txt \
BundledUpdateRevisionAndFileIds.txt \
| sort --unique \
> office-file-and-update-ids.txt
# Join with third file to get the FileLocations (URLs)
#
# Input file 1: office-file-and-update-ids.txt
# - Field 1: FileId of the PayloadFile
# - Field 2: UpdateId of the bundle record
# Input file 2: UpdateCabExeIdsAndLocations.txt
# - Field 1: FileId of the PayloadFile
# - Field 2: Location (URL)
# Output
# - Field 1: UpdateId of the bundle record
# - Field 2: Location (URL)
echo "Creating file office-update-ids-and-locations.txt ..."
join -t ',' -o 1.2,2.2 \
office-file-and-update-ids.txt \
UpdateCabExeIdsAndLocations.txt \
| sort --unique \
> office-update-ids-and-locations.txt
echo "Separate the updates into global and localized versions"
grep -F -- "-de-de_" office-update-ids-and-locations.txt > ofc-deu-ids-and-locations.txt
grep -F -- "-en-us_" office-update-ids-and-locations.txt > ofc-enu-ids-and-locations.txt
grep -F -v -f locales.txt office-update-ids-and-locations.txt > ofc-glb-ids-and-locations.txt
echo "Create the files UpdateTable-ofc-*.csv"
for lang in glb deu enu
do
while IFS="," read -r updateid url skiprest
do
printf '%s\r\n' "${updateid},${url##*/}"
done < "ofc-${lang}-ids-and-locations.txt" \
> "UpdateTable-ofc-${lang}.csv"
done
echo "Cut the second column with the locations"
cut -d "," -f "2" ofc-glb-ids-and-locations.txt | sort -u > ofc-glb-locations.txt
cut -d "," -f "2" ofc-deu-ids-and-locations.txt | sort -u > ofc-deu-locations.txt
cut -d "," -f "2" ofc-enu-ids-and-locations.txt | sort -u > ofc-enu-locations.txt
echo "Apply ExcludeList-Linux-superseded.txt"
join -v1 ofc-glb-locations.txt ExcludeList-Linux-superseded.txt > ofc-glb-locations-v2.txt
join -v1 ofc-deu-locations.txt ExcludeList-Linux-superseded.txt > ofc-deu-locations-v2.txt
join -v1 ofc-enu-locations.txt ExcludeList-Linux-superseded.txt > ofc-enu-locations-v2.txt
echo "Apply ExcludeList-ofc.txt"
grep -F -v -f ExcludeList-ofc.txt ofc-glb-locations-v2.txt > ofc-glb-locations-v3.txt
grep -F -v -f ExcludeList-ofc.txt ofc-deu-locations-v2.txt > StaticDownloadLinks-ofc-deu.txt
grep -F -v -f ExcludeList-ofc.txt ofc-enu-locations-v2.txt > StaticDownloadLinks-ofc-enu.txt
echo "Apply ExcludeList-ofc-glb.txt"
grep -F -v -f ExcludeList-ofc-glb.txt ofc-glb-locations-v3.txt > StaticDownloadLinks-ofc-glb.txt
echo "All done
To try out the created files,
- copy StaticDownloadLinks-ofc-*.txt to wsusoffline/static
- run the download script
- copy UpdateTable-ofc-*.csv to wsusoffline/client/ofc, replacing the
existing files"
exit 0
@echo off
REM Example script to extract all Office updates
REM H. Buhrmester, 2019
REM
REM Requirements
REM - Create the new files extract-office-revision-and-update-ids.xsl and
REM locales.txt as explained in the Forum
REM - XSLT.vbs and ExtractIdsAndFileNames.vbs are in wsusoffline\cmd
REM - gsort.exe and join.exe are in wsusoffline\bin
REM - extract-update-revision-and-file-ids.xsl and
REM extract-update-cab-exe-ids-and-locations.xsl are in wsusoffline\xslt
REM - The three ExcludeLists are in wsusoffline\exclude
REM - package.xml must be extracted from wsusscn2.cab
REM
REM Put everything into one directory to run this script
set CSCRIPT_PATH=%SystemRoot%\System32\cscript.exe
echo Extracting office-revision-and-update-ids.txt ...
%CSCRIPT_PATH% //Nologo //E:vbs XSLT.vbs package.xml extract-office-revision-and-update-ids.xsl office-revision-and-update-ids-unsorted.txt
gsort.exe -u -T "%TEMP%" office-revision-and-update-ids-unsorted.txt > office-revision-and-update-ids.txt
echo Extracting BundledUpdateRevisionAndFileIds.txt ...
%CSCRIPT_PATH% //Nologo //E:vbs XSLT.vbs package.xml extract-update-revision-and-file-ids.xsl BundledUpdateRevisionAndFileIds-unsorted.txt
gsort.exe -u -T "%TEMP%" BundledUpdateRevisionAndFileIds-unsorted.txt > BundledUpdateRevisionAndFileIds.txt
echo Extracting UpdateCabExeIdsAndLocations.txt ...
%CSCRIPT_PATH% //Nologo //E:vbs XSLT.vbs package.xml extract-update-cab-exe-ids-and-locations.xsl UpdateCabExeIdsAndLocations-unsorted.txt
gsort.exe -u -T "%TEMP%" UpdateCabExeIdsAndLocations-unsorted.txt > UpdateCabExeIdsAndLocations.txt
echo Creating file office-file-and-update-ids.txt ...
join.exe -t "," -o "2.3,1.2" office-revision-and-update-ids.txt BundledUpdateRevisionAndFileIds.txt > office-file-and-update-ids-unsorted.txt
gsort.exe -u -T "%TEMP%" office-file-and-update-ids-unsorted.txt > office-file-and-update-ids.txt
echo Creating File office-update-ids-and-locations.txt ...
join.exe -t "," -o "1.2,2.2" office-file-and-update-ids.txt UpdateCabExeIdsAndLocations.txt > office-update-ids-and-locations-unsorted.txt
gsort.exe -u -T "%TEMP%" office-update-ids-and-locations-unsorted.txt > office-update-ids-and-locations.txt
echo Separate the updates into global and localized versions
%SystemRoot%\System32\findstr.exe /L /I /C:"-de-de_" office-update-ids-and-locations.txt > ofc-deu-ids-and-locations.txt
%SystemRoot%\System32\findstr.exe /L /I /C:"-en-us_" office-update-ids-and-locations.txt > ofc-enu-ids-and-locations.txt
%SystemRoot%\System32\findstr.exe /L /I /V /G:"locales.txt" office-update-ids-and-locations.txt > ofc-glb-ids-and-locations.txt
echo Create the files UpdateTable-ofc-lang.csv
%CSCRIPT_PATH% //Nologo //E:vbs ExtractIdsAndFileNames.vbs ofc-deu-ids-and-locations.txt UpdateTable-ofc-deu.csv
%CSCRIPT_PATH% //Nologo //E:vbs ExtractIdsAndFileNames.vbs ofc-enu-ids-and-locations.txt UpdateTable-ofc-enu.csv
%CSCRIPT_PATH% //Nologo //E:vbs ExtractIdsAndFileNames.vbs ofc-glb-ids-and-locations.txt UpdateTable-ofc-glb.csv
echo Cut the second column with the locations
cut.exe -d "," -f "2" ofc-deu-ids-and-locations.txt > ofc-deu-locations-unsorted.txt
cut.exe -d "," -f "2" ofc-enu-ids-and-locations.txt > ofc-enu-locations-unsorted.txt
cut.exe -d "," -f "2" ofc-glb-ids-and-locations.txt > ofc-glb-locations-unsorted.txt
echo Sorting locations
gsort.exe -u -T "%TEMP%" ofc-deu-locations-unsorted.txt > ofc-deu-locations.txt
gsort.exe -u -T "%TEMP%" ofc-enu-locations-unsorted.txt > ofc-enu-locations.txt
gsort.exe -u -T "%TEMP%" ofc-glb-locations-unsorted.txt > ofc-glb-locations.txt
echo Apply ExcludeList-superseded.txt
join.exe -v1 ofc-deu-locations.txt ExcludeList-superseded.txt > ofc-deu-locations-v2.txt
join.exe -v1 ofc-enu-locations.txt ExcludeList-superseded.txt > ofc-enu-locations-v2.txt
join.exe -v1 ofc-glb-locations.txt ExcludeList-superseded.txt > ofc-glb-locations-v2.txt
echo Apply ExcludeList-ofc.txt
%SystemRoot%\System32\findstr.exe /L /I /V /G:"ExcludeList-ofc.txt" ofc-deu-locations-v2.txt > StaticDownloadLinks-ofc-deu.txt
%SystemRoot%\System32\findstr.exe /L /I /V /G:"ExcludeList-ofc.txt" ofc-enu-locations-v2.txt > StaticDownloadLinks-ofc-enu.txt
%SystemRoot%\System32\findstr.exe /L /I /V /G:"ExcludeList-ofc.txt" ofc-glb-locations-v2.txt > ofc-glb-locations-v3.txt
echo Apply ExcludeList-ofc-glb.txt
%SystemRoot%\System32\findstr.exe /L /I /V /G:"ExcludeList-ofc-glb.txt" ofc-glb-locations-v3.txt > StaticDownloadLinks-ofc-glb.txt
echo All done
echo To try out the created files,
echo - copy StaticDownloadLinks-ofc-*.txt to wsusoffline/static/custom
echo - run the download script
echo - copy UpdateTable-ofc-*.csv to wsusoffline/client/ofc, replacing
echo the existing files
wsusoffline1183-patch1
├── bin
│ ├── cut.exe
│ └── DownloadLink-UnxUtils.txt
├── cmd
│ ├── DownloadUpdates.cmd
│ └── locales.txt
└── xslt
└── extract-office-revision-and-update-ids.xsl
MD5 b784c3b07d918846a9dabc4416474757
SHA-1 c133f4013f7e5028c98dd46018571993220b362211f675b6a2ddf3aff6c376f7
unzip.exe -u -o AutoLogon.zip -x Eula.txt -d ..\client\bin
unzip.exe -u -o Sigcheck.zip -x Eula.txt
unzip.exe -u -o Streams.zip -x Eula.txt
>unzip -u -o AutoLogon.zip -x Eula.txt -d ..\client\bin
Archive: AutoLogon.zip
inflating: ../client/bin/Autologon.exe
>unzip -u -o Sigcheck.zip -x Eula.txt
Archive: Sigcheck.zip
inflating: sigcheck.exe
inflating: sigcheck64.exe
>unzip -u -o Streams.zip -x Eula.txt
Archive: Streams.zip
inflating: streams.exe
inflating: streams64.exe
UnZip 6.00 of 20 April 2009, by Info-ZIP. Maintained by C. Spieler. Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.
Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
Default action is to extract files in list, except those in xlist, to exdir;
file[.zip] may be a wildcard. -Z => ZipInfo mode ("unzip -Z" for usage).
-p extract files to pipe, no messages -l list files (short format)
-f freshen existing files, create none -t test compressed archive data
-u update files, create if necessary -z display archive comment only
-v list verbosely/show version info -T timestamp archive to latest
-x exclude files that follow (in xlist) -d extract files into exdir
modifiers:
-n never overwrite existing files -q quiet mode (-qq => quieter)
-o overwrite files WITHOUT prompting -a auto-convert any text files
-j junk paths (do not make directories) -aa treat ALL files as text
-C match filenames case-insensitively -L make (some) names lowercase
-$ label removables (-$$ => fixed disks) -V retain VMS version numbers
-X restore ACLs (-XX => use privileges) -s spaces in filenames => '_'
-M pipe through "more" pager
See "unzip -hh" or unzip.txt for more help. Examples:
unzip data1 -x joe => extract all files except joe from zipfile data1.zip
unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer
Cleaning up client directory for o2k10 enu...
Removing NTFS alternate data streams for o2k10 enu...
Verifying digital file signatures for o2k10 enu...
Warning: Deleted unsigned file "C:\Dokumente und Einstellungen\Anwender\Eigene Dateien\wsusoffline1183\client\o2k10\enu\officesp2010-kb2687455-fullfile-x86-en-us.exe".
19.01.2020 10:22:57,74 - Warning: Deleted unsigned file "C:\Dokumente>>..\log\download.log
Creating integrity database for o2k10 enu...
Cleaning up client directory for o2k10 deu...
Removing NTFS alternate data streams for o2k10 deu...
Verifying digital file signatures for o2k10 deu...
Warning: Deleted unsigned file "C:\Dokumente und Einstellungen\Anwender\Eigene Dateien\wsusoffline1183\client\o2k10\deu\officesp2010-kb2687455-fullfile-x86-de-de.exe".
19.01.2020 10:56:19,06 - Warning: Deleted unsigned file "C:\Dokumente>>..\log\download.log
Creating integrity database for o2k10 deu...
Users browsing this forum: No registered users and 80 guests