Superseded Updates in drei einfachen Schritten

Superseded Updates in drei einfachen Schritten

Postby hbuhrmester » 13.06.2016, 10:19

Bestimmung der superseded Updates in drei einfachen Schritten

Ich möchte noch einmal einen Vorschlag aufgreifen, den ich vor einiger Zeit vorgestellt hatte:
viewtopic.php?f=5&t=5082

Dieser Thread beschreibt eine neue Methode zur Bestimmung der superseded Updates. Zusammengehörige Felder werden aus der Datei package.xml extrahiert, indem die relativen Pfade innerhalb der Datei (XPATH) berücksichtigt werden. Die extrahierten Daten können anschließend mit join verknüpft werden. Dann sind nur noch drei Schritte zur Bestimmung der superseded Updates nötig:

Image

Die Vorteile sind:
  • Die Methode ist genauer, da die Beziehungen zwischen den extrahierten Datenfeldern erhalten bleiben.
  • Die Methode ist schneller, da sie keine langen Programmschleifen im Skript verwendet. Sie benötigt nur GNU sort und join zur Verknüpfung der Daten.

Anwendung der Datei ExcludeList-superseded.txt

Die Bestimmung der superseded Updates liefert eine Datei mit vollständigen URLs. Die Bestimmung der dynamischen Updates liefert ebenfalls eine Datei mit vollständigen URLs. Beide Dateien können mit join verglichen werden. "join -v1" liefert dabei einen "left join", also die URLs, die nur auf der linken Seite vorkommen. Die Datei ExcludeList-superseded.txt sollte deshalb in einem separaten Schritt angewendet werden:

Code: Select all
join -v1 DynamicDownloadLinks.txt ExcludeList-superseded.txt > ValidDynamicLinks.txt


join ist für diesen Schritt effizienter als FindStr.exe oder grep:
  • join kann zwei sortierte Dateien vergleichen, indem abwechselnd aus beiden Dateien gelesen wird.
  • FindStr.exe und grep müssen dagegen jede Zeile der einen Datei mit jeder Zeile der anderen Datei vergleichen. FindStr.exe hat beim Vergleich großer Dateien Schwächen gezeigt, und grep scheint bei diesem Schritt manchmal zu viel Arbeitsspeicher zu verbrauchen.
    viewtopic.php?f=5&t=4836
    viewtopic.php?f=9&t=4507

Anschließend müssen noch weitere ExcludeLists angewendet werden, die nur KB-Nummern enthalten. Dazu wird dann doch wieder FindStr.exe oder grep eingesetzt. Diese Dateien sind aber weitaus kleiner als die Datei ExcludeList-superseded.txt.

Eine Beispielimplementierung zum Bestimmung und Anwendung der superseded Updates sieht dann so aus:

Code: Select all
@echo off
setlocal enableextensions enabledelayedexpansion
set CSCRIPT_PATH=%SystemRoot%\System32\cscript.exe
set DOWNLOAD_LOGFILE=..\log\download.log
set DLDR_PATH=..\bin\wget.exe
set DLDR_COPT=-N
set DLDR_LOPT=-a %DOWNLOAD_LOGFILE%
set DLDR_IOPT=-i
set DLDR_POPT=-P
set DLDR_NVOPT=-nv

rem Always recalculate superseded updates
if exist ..\exclude\ExcludeList-superseded.txt del ..\exclude\ExcludeList-superseded.txt
rem Make Temp folder easier to find
if not exist ..\Temp\nul md ..\Temp
set TEMP=..\Temp
rem Configure proxy server
rem set http_proxy=http://192.168.2.101:3128

rem Example implementation for the determination of superseded updates.
rem
rem This is an excerpt of the script DownloadUpdates.cmd with revised parts
rem for the calculation of superseded updates and dynamic download links.

rem Get WSUS catalog file
echo Downloading/validating most recent Windows Update Agent installation and catalog files...
%DLDR_PATH% %DLDR_COPT% %DLDR_IOPT% ..\static\StaticDownloadLinks-wsus.txt %DLDR_POPT% ..\client\wsus
if errorlevel 1 goto DownloadError
echo %DATE% %TIME% - Info: Downloaded/validated most recent Windows Update Agent installation and catalog files>>%DOWNLOAD_LOGFILE%

call :DownloadCore w60 glb x86
if errorlevel 1 goto Error
goto EoF

:DownloadCore
rem *** Determine update urls for %1 %2 ***

rem *** Extract Microsoft's update catalog file package.xml ***
echo Extracting Microsoft's update catalog file package.xml...
if exist "%TEMP%\package.cab" del "%TEMP%\package.cab"
if exist "%TEMP%\package.xml" del "%TEMP%\package.xml"
%SystemRoot%\System32\expand.exe ..\client\wsus\wsusscn2.cab -F:package.cab "%TEMP%" >nul
%SystemRoot%\System32\expand.exe "%TEMP%\package.cab" "%TEMP%\package.xml" >nul
del "%TEMP%\package.cab"

rem *** Determine superseded updates ***
rem *** Download ExcludeList-superseded-exclude.txt ***

for %%i in (..\client\wsus\wsusscn2.cab) do echo %%~ai | %SystemRoot%\System32\find.exe /I "a" >nul 2>&1
if not errorlevel 1 (
  if exist ..\exclude\ExcludeList-superseded.txt del ..\exclude\ExcludeList-superseded.txt
)
copy /Y ..\exclude\ExcludeList-superseded-exclude.txt ..\exclude\ExcludeList-superseded-exclude.ori >nul
%DLDR_PATH% %DLDR_COPT% %DLDR_NVOPT% %DLDR_POPT% ..\exclude %DLDR_LOPT% http://download.wsusoffline.net/ExcludeList-superseded-exclude.txt
echo n | %SystemRoot%\System32\comp.exe ..\exclude\ExcludeList-superseded-exclude.txt ..\exclude\ExcludeList-superseded-exclude.ori /A /L /C >nul 2>&1
if errorlevel 1 (
  if exist ..\exclude\ExcludeList-superseded.txt del ..\exclude\ExcludeList-superseded.txt
)
del ..\exclude\ExcludeList-superseded-exclude.ori
if exist ..\exclude\ExcludeList-superseded.txt (
  echo Found valid list of superseded updates.
  echo %DATE% %TIME% - Info: Found valid list of superseded updates>>%DOWNLOAD_LOGFILE%
  goto SkipSuperseded
)

echo %TIME% - Determining superseded updates (please be patient, this will take a while)...

rem *** Revised part for determination of superseded updates starts here ***
rem *** First step ***

echo Extract file 1
%CSCRIPT_PATH% //Nologo //E:vbs XSLT.vbs "%TEMP%\package.xml" ..\xslt\extract-existing-bundle-revision-ids.xsl "%TEMP%\existing-bundle-revision-ids.txt"

..\bin\gsort.exe -u -T "%TEMP%" "%TEMP%\existing-bundle-revision-ids.txt" > "%TEMP%\existing-bundle-revision-ids-unique.txt"
del "%TEMP%\existing-bundle-revision-ids.txt"

echo Extract file 2
%CSCRIPT_PATH% //Nologo //E:vbs XSLT.vbs "%TEMP%\package.xml" ..\xslt\extract-superseding-and-superseded-revision-ids.xsl "%TEMP%\superseding-and-superseded-revision-ids.txt"

..\bin\gsort.exe -u -T "%TEMP%" "%TEMP%\superseding-and-superseded-revision-ids.txt" > "%TEMP%\superseding-and-superseded-revision-ids-unique.txt"
del "%TEMP%\superseding-and-superseded-revision-ids.txt"

echo Join files 1 and 2 to file 3
..\bin\join.exe -t "," -o "2.2" "%TEMP%\existing-bundle-revision-ids-unique.txt" "%TEMP%\superseding-and-superseded-revision-ids-unique.txt" > "%TEMP%\ValidSupersededRevisionIds.txt"
del "%TEMP%\existing-bundle-revision-ids-unique.txt"
del "%TEMP%\superseding-and-superseded-revision-ids-unique.txt"

..\bin\gsort.exe -u -T "%TEMP%" "%TEMP%\ValidSupersededRevisionIds.txt" > "%TEMP%\ValidSupersededRevisionIds-unique.txt"
del "%TEMP%\ValidSupersededRevisionIds.txt"

rem *** Second step ***

echo Extract file 4
%CSCRIPT_PATH% //Nologo //E:vbs XSLT.vbs "%TEMP%\package.xml" ..\xslt\extract-update-revision-and-file-ids.xsl "%TEMP%\BundledUpdateRevisionAndFileIds.txt"

..\bin\gsort.exe -u -T "%TEMP%" "%TEMP%\BundledUpdateRevisionAndFileIds.txt" > "%TEMP%\BundledUpdateRevisionAndFileIds-unique.txt"
del "%TEMP%\BundledUpdateRevisionAndFileIds.txt"

echo Join files 3 and 4 to file 5
..\bin\join.exe -t "," -o "2.3" "%TEMP%\ValidSupersededRevisionIds-unique.txt" "%TEMP%\BundledUpdateRevisionAndFileIds-unique.txt" > "%TEMP%\SupersededFileIds.txt"
del "%TEMP%\ValidSupersededRevisionIds-unique.txt"
del "%TEMP%\BundledUpdateRevisionAndFileIds-unique.txt"

..\bin\gsort.exe -u -T "%TEMP%" "%TEMP%\SupersededFileIds.txt" > "%TEMP%\SupersededFileIds-unique.txt"
del "%TEMP%\SupersededFileIds.txt"

rem *** Third step ***

echo Extract file 6
%CSCRIPT_PATH% //Nologo //E:vbs XSLT.vbs "%TEMP%\package.xml" ..\xslt\extract-update-cab-exe-ids-and-locations.xsl "%TEMP%\UpdateCabExeIdsAndLocations.txt"

..\bin\gsort.exe -u -T "%TEMP%" "%TEMP%\UpdateCabExeIdsAndLocations.txt" > "%TEMP%\UpdateCabExeIdsAndLocations-unique.txt"
del "%TEMP%\UpdateCabExeIdsAndLocations.txt"

echo Join files 5 and 6 to file 7
..\bin\join.exe -t "," -o "2.2" "%TEMP%\SupersededFileIds-unique.txt" "%TEMP%\UpdateCabExeIdsAndLocations-unique.txt" > "%TEMP%\ExcludeListLocations-superseded-all.txt"
del "%TEMP%\SupersededFileIds-unique.txt"
del "%TEMP%\UpdateCabExeIdsAndLocations-unique.txt"

..\bin\gsort.exe -u -T "%TEMP%" "%TEMP%\ExcludeListLocations-superseded-all.txt" > "%TEMP%\ExcludeListLocations-superseded-all-unique.txt"
del "%TEMP%\ExcludeListLocations-superseded-all.txt"

rem *** Apply ExcludeList-superseded-exclude.txt ***

if exist ..\exclude\ExcludeList-superseded-exclude.txt copy /Y ..\exclude\ExcludeList-superseded-exclude.txt "%TEMP%\ExcludeList-superseded-exclude.txt" >nul
if exist ..\exclude\custom\ExcludeList-superseded-exclude.txt (
  type ..\exclude\custom\ExcludeList-superseded-exclude.txt >>"%TEMP%\ExcludeList-superseded-exclude.txt"
)
rem Delete file if empty
for %%i in ("%TEMP%\ExcludeList-superseded-exclude.txt") do if %%~zi==0 del %%i
if exist "%TEMP%\ExcludeList-superseded-exclude.txt" (
  %SystemRoot%\System32\findstr.exe /L /I /V /G:"%TEMP%\ExcludeList-superseded-exclude.txt" "%TEMP%\ExcludeListLocations-superseded-all-unique.txt" >..\exclude\ExcludeList-superseded.txt
  del "%TEMP%\ExcludeListLocations-superseded-all-unique.txt"
  del "%TEMP%\ExcludeList-superseded-exclude.txt"
) else (
  move /Y "%TEMP%\ExcludeListLocations-superseded-all-unique.txt" ..\exclude\ExcludeList-superseded.txt >nul
)
%SystemRoot%\System32\attrib.exe -A ..\client\wsus\wsusscn2.cab
echo %TIME% - Done.
echo %DATE% %TIME% - Info: Determined superseded updates>>%DOWNLOAD_LOGFILE%
:SkipSuperseded

rem At this point, the file ..\exclude\ExcludeList-superseded.txt still
rem contains complete URLs, rather than just the file names.

rem Determination of static updates can be skipped, because there are no
rem changes here.

rem *** Suggested usage of the file ..\exclude\ExcludeList-superseded.txt
rem for the determination of valid dynamic download links ***

:DetermineWindows
rem *** Determine dynamic update urls for %1 %2 ***
echo %TIME% - Determining dynamic update urls for %1 %2...
if exist ..\xslt\ExtractDownloadLinks-%1-%2.xsl (
  %CSCRIPT_PATH% //Nologo //B //E:vbs XSLT.vbs "%TEMP%\package.xml" ..\xslt\ExtractDownloadLinks-%1-%2.xsl "%TEMP%\DynamicDownloadLinks-%1-%2.txt"
  if errorlevel 1 goto DownloadError
)
if exist ..\xslt\ExtractDownloadLinks-%1-%3-%2.xsl (
  %CSCRIPT_PATH% //Nologo //B //E:vbs XSLT.vbs "%TEMP%\package.xml" ..\xslt\ExtractDownloadLinks-%1-%3-%2.xsl "%TEMP%\DynamicDownloadLinks-%1-%2.txt"
  if errorlevel 1 goto DownloadError
)
del "%TEMP%\package.xml"

if not exist "%TEMP%\DynamicDownloadLinks-%1-%2.txt" goto DoDownload

rem A left join of the files DynamicDownloadLinks.txt and
rem ExcludeList-superseded.txt returns URLs, which are unique
rem to the left side. The intermediate file will be called
rem "DynamicDownloadLinks-pruned.txt".

rem As always, both input files must be sorted.
..\bin\gsort.exe -u -T "%TEMP%" "%TEMP%\DynamicDownloadLinks-%1-%2.txt" > "%TEMP%\DynamicDownloadLinks-%1-%2-unique.txt"
del "%TEMP%\DynamicDownloadLinks-%1-%2.txt"

..\bin\join.exe -v1 "%TEMP%\DynamicDownloadLinks-%1-%2-unique.txt" ..\exclude\ExcludeList-superseded.txt > "%TEMP%\DynamicDownloadLinks-%1-%2-pruned.txt"
del "%TEMP%\DynamicDownloadLinks-%1-%2-unique.txt"

rem The remaining exclude lists are applied as before.

if exist "%TEMP%\ExcludeList-%1.txt" del "%TEMP%\ExcludeList-%1.txt"
if exist ..\exclude\ExcludeList-%1.txt copy /Y ..\exclude\ExcludeList-%1.txt "%TEMP%\ExcludeList-%1.txt" >nul
if exist ..\exclude\custom\ExcludeList-%1.txt (
  type ..\exclude\custom\ExcludeList-%1.txt >>"%TEMP%\ExcludeList-%1.txt"
)
if exist "%TEMP%\ExcludeList-%1.txt" goto ExcludeWindows
if exist ..\exclude\ExcludeList-%1-%3.txt copy /Y ..\exclude\ExcludeList-%1-%3.txt "%TEMP%\ExcludeList-%1.txt" >nul
if exist ..\exclude\custom\ExcludeList-%1-%3.txt (
  type ..\exclude\custom\ExcludeList-%1-%3.txt >>"%TEMP%\ExcludeList-%1.txt"
)
:ExcludeWindows
if exist ..\exclude\custom\ExcludeListForce-all.txt (
  type ..\exclude\custom\ExcludeListForce-all.txt >>"%TEMP%\ExcludeList-%1.txt"
)
if exist "%TEMP%\ValidDynamicLinks-%1-%2.txt" del "%TEMP%\ValidDynamicLinks-%1-%2.txt"
%SystemRoot%\System32\findstr.exe /L /I /V /G:"%TEMP%\ExcludeList-%1.txt" "%TEMP%\DynamicDownloadLinks-%1-%2-pruned.txt" >>"%TEMP%\ValidDynamicLinks-%1-%2.txt"
if not exist "%TEMP%\ValidDynamicLinks-%1-%2.txt" ren "%TEMP%\DynamicDownloadLinks-%1-%2-pruned.txt" ValidDynamicLinks-%1-%2.txt
if exist "%TEMP%\ExcludeList-%1.txt" del "%TEMP%\ExcludeList-%1.txt"
if exist "%TEMP%\DynamicDownloadLinks-%1-%2-pruned.txt" del "%TEMP%\DynamicDownloadLinks-%1-%2-pruned.txt"
echo %TIME% - Done.
echo %DATE% %TIME% - Info: Determined dynamic update urls for %1 %2>>%DOWNLOAD_LOGFILE%
goto DoDownload

:DoDownload
rem End of function :DownloadCore
verify >nul
goto :eof

:DownloadError
:Error
:EoF
endlocal


Dieses Beispielskript kann aus dem Verzeichnis wsusoffline\cmd oder einem anderen Verzeichnis auf derselben Ebene aufgerufen werden.

Die vier verwendeten XSLT-Dateien sind dieselben wie im Beitrag:

Übersetzung in XSLT-Dateien (Teil 8)
viewtopic.php?f=5&t=5082#p16399

Diese XSLT-Dateien gehören in das Verzeichnis wsusoffline\xslt. Außerdem wird die Datei XSLT.vbs benötigt, die im selben Verzeichnis liegen muss wie das Beispielskript.

superseded-updates.png
(32.78 KiB) Not downloaded yet


Edit: Setzen des Proxy Servers wurde auskommentiert
hbuhrmester
 
Posts: 525
Joined: 11.10.2013, 20:59

Re: Superseded Updates in drei einfachen Schritten

Postby aker » 13.06.2016, 15:08

Daumen hoch von mir.
Wer Rechtschreibfehler findet, darf sie behalten oder an den Meistbietenden versteigern. / Everybody finding a misspelling is allowed to keep or sell it.
aker

WSUS Offline Update „Community Edition“
https://gitlab.com/wsusoffline/wsusoffline/-/releases
aker
 
Posts: 3999
Joined: 02.03.2011, 15:32

Re: Superseded Updates in drei einfachen Schritten

Postby WSUSUpdateAdmin » 14.06.2016, 15:35

Moin!

Wow, Hartmut! :)

Vielen Dank wieder einmal für Deine Mühe!

Ich hatte Dir ja vor einiger Zeit geschrieben, dass ich das Thema aus Ressourcengründen aufschiebe, aber wenn ich es so mundgerecht aufbereitet bekomme, kann ich ja gar nicht umhin, mich damit noch einmal zu beschäftigen... ;)

Es ist zwar gerade wieder oder immer noch viel anderes Zeug zu tun, aber ich schlage folgendes vor:
  • Konsolidierung der aufgelaufenen Änderungen und eventuell nachdem heutigen Patchday nötigen Ergänzungen zu einer Version 10.6.3.
  • Einbau Deiner neuen Ermittlung der Superseded Updates "in drei einfachen Schritten".

So hat man Zeit und Ruhe, auch zum Testen.

Okay?

Danke & Gruß
Torsten
WSUSUpdateAdmin
Administrator
 
Posts: 2245
Joined: 07.07.2009, 14:38

Re: Superseded Updates in drei einfachen Schritten

Postby hbuhrmester » 14.06.2016, 19:39

Natürlich, das sollte schon gründlich getestet werden...

Viele Grüße,
Hartmut
hbuhrmester
 
Posts: 525
Joined: 11.10.2013, 20:59

Re: Superseded Updates in drei einfachen Schritten

Postby Rush » 17.06.2016, 09:48

von mir auch daumen hoch :)
Rush
 
Posts: 177
Joined: 09.08.2015, 19:05

Re: Superseded Updates in drei einfachen Schritten

Postby Matjes » 12.07.2016, 19:04

Hallo zusammen,

ich hab mal die Version r782 gegen die Version r783 :) getestet.

1) Lauf r782 (o2k7, ofc, w61, w61-x64)
2) wsusscn2.cab löschen
3) Update auf Version r783
4) Lauf r783 (o2k7, ofc, w61, w61-x64)

im Folgenden die Differenzen(7 Office-Dateien) aus dem Logfile
Code: Select all
12.07.2016 17:21:10,51 - Info: application: Office 2007 (o2k7), language: deu
12.07.2016 17:21:10,52 - Info: command-line: "D:\ct_wsusoffline\\cmd\DownloadUpdates.cmd" o2k7 deu  /includedotnet /includemsse

--------------------------------------------------------------------------------

12.07.2016 17:21:10,54 - Info: Starting WSUS Offline Update download (v. 10.7b (r783)) for o2k7 deu
12.07.2016 17:21:10,54 - Info: Option /includedotnet detected
12.07.2016 17:21:10,56 - Info: Option /includemsse detected
...
12.07.2016 17:28:19,85 - Info: Downloaded/validated 0 statically defined updates for ofc deu
2016-07-12 17:28:22 URL:http://download.windowsupdate.com/msdownload/update/software/secu/2009/05/works432_02d3c8fcac7fcb41f50be2ef48e692899cbc4fb8.cab [142638/142638] -> "../client/ofc/deu/works432_02d3c8fcac7fcb41f50be2ef48e692899cbc4fb8.cab" [1]
12.07.2016 17:28:22,02 - Info: Downloaded/validated 5 dynamically determined updates for ofc deu
...
12.07.2016 17:28:33,24 - Info: Ending WSUS Offline Update download for o2k7 deu

--------------------------------------------------------------------------------

12.07.2016 17:28:33,35 - Info: application: Windows 7 (w61), language: glb
12.07.2016 17:28:33,36 - Info: command-line: "D:\ct_wsusoffline\\cmd\DownloadUpdates.cmd" w61 glb  /includedotnet /includemsse

--------------------------------------------------------------------------------

12.07.2016 17:28:33,39 - Info: Starting WSUS Offline Update download (v. 10.7b (r783)) for w61 glb
12.07.2016 17:28:33,41 - Info: Option /includedotnet detected
12.07.2016 17:28:33,44 - Info: Option /includemsse detected
12.07.2016 17:28:33,56 - Info: Set time zone to LOC-2:00
...
12.07.2016 17:30:37,81 - Info: Ending WSUS Offline Update download for w61 glb

--------------------------------------------------------------------------------

12.07.2016 17:30:37,90 - Info: application: Windows Server 2008 R2 (w61-x64), language: glb
12.07.2016 17:30:37,95 - Info: command-line: "D:\ct_wsusoffline\\cmd\DownloadUpdates.cmd" w61-x64 glb  /includedotnet /includemsse

--------------------------------------------------------------------------------

12.07.2016 17:30:38,03 - Info: Starting WSUS Offline Update download (v. 10.7b (r783)) for w61-x64 glb
12.07.2016 17:30:38,03 - Info: Option /includedotnet detected
12.07.2016 17:30:38,07 - Info: Option /includemsse detected
12.07.2016 17:30:38,26 - Info: Set time zone to LOC-2:00
12.07.2016 17:30:39,12 - Info: Updated static download and update definitions
...
12.07.2016 17:35:45,16 - Info: Ending WSUS Offline Update download for w61-x64 glb

--------------------------------------------------------------------------------

12.07.2016 17:35:45,19 - Info: application: Office (ofc), language: glb
12.07.2016 17:35:45,22 - Info: command-line: "D:\ct_wsusoffline\\cmd\DownloadUpdates.cmd" ofc glb  /includedotnet /includemsse

--------------------------------------------------------------------------------

12.07.2016 17:35:45,25 - Info: Starting WSUS Offline Update download (v. 10.7b (r783)) for ofc glb
12.07.2016 17:35:45,25 - Info: Option /includedotnet detected
12.07.2016 17:35:45,28 - Info: Option /includemsse detected
12.07.2016 17:35:45,41 - Info: Set time zone to LOC-2:00
...
12.07.2016 17:42:18,26 - Info: Downloaded/validated 4 statically defined updates for ofc glb
2016-07-12 17:42:44 URL:http://download.windowsupdate.com/msdownload/update/software/secu/2008/10/cdo10_61fbcbecc6f2f6802f05fd55cfc193e8dfb2b9cc.cab [358985/358985] -> "../client/ofc/glb/cdo10_61fbcbecc6f2f6802f05fd55cfc193e8dfb2b9cc.cab" [1]
2016-07-12 17:42:59 URL:http://download.windowsupdate.com/msdownload/update/software/secu/2009/08/owc10_57d5689f99443813055bca3a58eca2df2ab5d048.cab [10144234/10144234] -> "../client/ofc/glb/owc10_57d5689f99443813055bca3a58eca2df2ab5d048.cab" [1]
2016-07-12 17:43:02 URL:http://download.windowsupdate.com/msdownload/update/software/secu/2010/04/vbe6_1b380133af898cf956d8b39992761eac3f86137f.cab [1580884/1580884] -> "../client/ofc/glb/vbe6_1b380133af898cf956d8b39992761eac3f86137f.cab" [1]
2016-07-12 17:43:09 URL:http://download.windowsupdate.com/msdownload/update/software/secu/2010/09/winword_bd3b0b18163e52e2b7edb499ebcfcca7414c5253.cab [5197368/5197368] -> "../client/ofc/glb/winword_bd3b0b18163e52e2b7edb499ebcfcca7414c5253.cab" [1]
2016-07-12 17:43:19 URL:http://download.windowsupdate.com/msdownload/update/software/secu/2010/12/mspub_b0c50f8d10570feb5ef5cab0bc28ea0a342741b9.cab [6334276/6334276] -> "../client/ofc/glb/mspub_b0c50f8d10570feb5ef5cab0bc28ea0a342741b9.cab" [1]
2016-07-12 17:43:26 URL:http://download.windowsupdate.com/msdownload/update/software/secu/2011/03/shared_9a730caaf3cd5a3187388bd94356e1f368b3bc5a.cab [4842554/4842554] -> "../client/ofc/glb/shared_9a730caaf3cd5a3187388bd94356e1f368b3bc5a.cab" [1]
2016-07-12 17:43:37 URL:http://download.windowsupdate.com/msdownload/update/software/secu/2011/05/powerpnt_7912df405229fb025e8ca912ddf746abb20d30b6.cab [7672308/7672308] -> "../client/ofc/glb/powerpnt_7912df405229fb025e8ca912ddf746abb20d30b6.cab" [1]
2016-07-12 17:43:57 URL:http://download.windowsupdate.com/msdownload/update/software/secu/2011/06/excel_6b6c723f3a4be24058b0b8e73f671f5cbd1854bb.cab [13853074/13853074] -> "../client/ofc/glb/excel_6b6c723f3a4be24058b0b8e73f671f5cbd1854bb.cab" [1]
12.07.2016 17:43:59,20 - Info: Downloaded/validated 209 dynamically determined updates for ofc glb
...
12.07.2016 17:44:05,50 - Info: Ending WSUS Offline Update download for ofc glb


Das sind alles alte Schätzchen :o
Code: Select all
 Verzeichnis von D:\ct_wsusoffline\client\ofc\deu

29.05.2009  16:57           142.638 works432_02d3c8fcac7fcb41f50be2ef48e692899cbc4fb8.cab
               1 Datei(en),        142.638 Bytes

 Verzeichnis von D:\ct_wsusoffline\client\ofc\glb

01.10.2008  03:57           358.985 cdo10_61fbcbecc6f2f6802f05fd55cfc193e8dfb2b9cc.cab
               1 Datei(en),        358.985 Bytes
03.08.2009  20:50        10.144.234 owc10_57d5689f99443813055bca3a58eca2df2ab5d048.cab
               1 Datei(en),     10.144.234 Bytes
27.04.2010  00:55         1.580.884 vbe6_1b380133af898cf956d8b39992761eac3f86137f.cab
               1 Datei(en),      1.580.884 Bytes
29.09.2010  22:11         5.197.368 winword_bd3b0b18163e52e2b7edb499ebcfcca7414c5253.cab
               1 Datei(en),      5.197.368 Bytes
02.12.2010  23:44         6.334.276 mspub_b0c50f8d10570feb5ef5cab0bc28ea0a342741b9.cab
               1 Datei(en),      6.334.276 Bytes
30.03.2011  02:13         4.842.554 shared_9a730caaf3cd5a3187388bd94356e1f368b3bc5a.cab
               1 Datei(en),      4.842.554 Bytes
05.05.2011  21:50         7.672.308 powerpnt_7912df405229fb025e8ca912ddf746abb20d30b6.cab
               1 Datei(en),      7.672.308 Bytes
03.06.2011  19:25        13.853.074 excel_6b6c723f3a4be24058b0b8e73f671f5cbd1854bb.cab
               1 Datei(en),     13.853.074 Bytes


Bis auf diese Differenzen kommt der neue Mechanismus zum gleichen Ergebnis wie r782.
TOLL und RASEND SCHNELL :)

Grüße Matjes
Matjes
 
Posts: 76
Joined: 16.06.2010, 17:56

Re: Superseded Updates in drei einfachen Schritten

Postby Alex » 13.07.2016, 04:15

Moin zusammen,

r783 kommt mit W100 glb reproduzierbar nicht klar, keine Ahnung warum.
Alle Anderen klappen (w60 glb, w60-x64 glb, w61 glb, 61-x64 glb, w63 glb, w63-x64 glb, w100-x64 glb, ofc glb, o2k7 deu, o2k10 deu, o2k13 deu, o2k16 glb)

Code: Select all
Cleaning up client directory for win glb...
Removing NTFS alternate data streams for win glb...

Extracting Microsoft's update catalog file package.xml...
Found valid list of superseded updates.
Determining static update urls for w100 glb...
 4:24:15,07 - Determining dynamic update urls for w100 glb...
FINDSTR: Keine Suchzeichenfolge
 4:24:26,45 - Done.
Downloading/validating statically defined updates for w100 glb...
Downloading/validating dynamically determined updates for w100 glb...
Reminding build date...
Done.


Auffällig ist "FINDSTR: Keine Suchzeichenfolge"

Mit r782 klappt es auch bei w100 glb...
Code: Select all
Cleaning up client directory for win glb...
Removing NTFS alternate data streams for win glb...

Extracting Microsoft's update catalog file package.xml...
Found valid list of superseded updates.
Determining static update urls for w100 glb...
 4:43:30,88 - Determining dynamic update urls for w100 glb...
 4:43:45,20 - Done.
Downloading/validating statically defined updates for w100 glb...
Downloading/validating dynamically determined updates for w100 glb..
Downloading/validating update 1 of 4...
Downloading/validating update 2 of 4...
Downloading/validating update 3 of 4...
Downloading/validating update 4 of 4...
Cleaning up client directory for w100 glb...
Removing NTFS alternate data streams for w100 glb...
Reminding build date...
Done.


Viele Grüsse

Alex
Alex
 
Posts: 22
Joined: 13.02.2015, 11:00

Re: Superseded Updates in drei einfachen Schritten

Postby hbuhrmester » 13.07.2016, 06:48

Die Anwendung der Exclude-Listen geschieht jetzt in zwei Schritten: Erst wird die Datei ExcludeList-superseded.txt angewendet, dann die spezifischen, kleineren ExcludeLists.

Aber die Dateien ExcludeListForce-all.txt und ExcludeList-w100-x86.txt sind beide leer, als einzige in diesem Ordner. Das führt dazu, dass eine leere temporäre Datei erstellt wird, und diese wiederum führt zum Fehler in FindStr.exe.

Dann muss man noch einen Test auf leere Dateien einfügen:

Code: Select all
for %%i in ("%TEMP%\ExcludeList-%1.txt") do if %%~zi==0 del "%%i"


Wahrscheinlich muss man die Variable "%%i" in diesem Fall in Anführungszeichen setzen, weil der Pfad zum Temp-Ordner Leerzeichen enthalten kann. Bei dem Ausdruck %%~zi bin ich mir nicht sicher.

Im Kontext würde der Test dann so eingefügt:

Code: Select all
rem The remaining exclude lists are applied as before.
if exist "%TEMP%\ExcludeList-%1.txt" del "%TEMP%\ExcludeList-%1.txt"
if exist ..\exclude\ExcludeList-%1-%3.txt (
  copy /Y ..\exclude\ExcludeList-%1-%3.txt "%TEMP%\ExcludeList-%1.txt" >nul
  if exist ..\exclude\custom\ExcludeList-%1-%3.txt (
    type ..\exclude\custom\ExcludeList-%1-%3.txt >>"%TEMP%\ExcludeList-%1.txt"
  )
) else (
  if exist ..\exclude\ExcludeList-%1.txt copy /Y ..\exclude\ExcludeList-%1.txt "%TEMP%\ExcludeList-%1.txt" >nul
  if exist ..\exclude\custom\ExcludeList-%1.txt (
    type ..\exclude\custom\ExcludeList-%1.txt >>"%TEMP%\ExcludeList-%1.txt"
  )
)
if exist ..\exclude\custom\ExcludeListForce-all.txt (
  type ..\exclude\custom\ExcludeListForce-all.txt >>"%TEMP%\ExcludeList-%1.txt"
)

rem Check for empty combined exclude list, currently only for w100-x86
for %%i in ("%TEMP%\ExcludeList-%1.txt") do if %%~zi==0 del "%%i"

if exist "%TEMP%\ExcludeList-%1.txt" (
  %SystemRoot%\System32\findstr.exe /L /I /V /G:"%TEMP%\ExcludeList-%1.txt" "%TEMP%\DynamicDownloadLinks-%1-%2-pruned.txt" >"%TEMP%\ValidDynamicLinks-%1-%2.txt"
  del "%TEMP%\DynamicDownloadLinks-%1-%2-pruned.txt"
  del "%TEMP%\ExcludeList-%1.txt"
) else (
  move /Y "%TEMP%\DynamicDownloadLinks-%1-%2-pruned.txt" "%TEMP%\ValidDynamicLinks-%1-%2.txt" >nul
)
echo %TIME% - Done.


Entsprechend auch für die dynamischen Office-Updates.

Viele Grüße,
Hartmut
hbuhrmester
 
Posts: 525
Joined: 11.10.2013, 20:59

Re: Superseded Updates in drei einfachen Schritten

Postby Alex » 13.07.2016, 14:18

Danke, Hartmut!

Mit der geänderten DownloadUpdates.cmd klappt es wieder.
hbuhrmester wrote:Aber die Dateien ExcludeListForce-all.txt und ExcludeList-w100-x86.txt sind beide leer, als einzige in diesem Ordner. Das führt dazu, dass eine leere temporäre Datei erstellt wird, und diese wiederum führt zum Fehler in FindStr.exe.

Viele Grüsse

Alex
Alex
 
Posts: 22
Joined: 13.02.2015, 11:00

Re: Superseded Updates in drei einfachen Schritten

Postby WSUSUpdateAdmin » 15.07.2016, 11:52

Moin!

So, nun möchte ich zu diesem Thema abschließend auch noch etwas sagen, nämlich ein riesengroßes "Dankeschön" an Hartmut! :D

Der überarbeitete Algorithmus zur Erkennung der "superseded updates" war so tiptop recherchiert, implementiert und dokumentiert, dass der Einbau fast schon beängstigend einfach war.
Die neuen XSLT-Filter mit den XPath-Ausdrücken - zum Zungeschnalzen ;) - da bin ich schon an der Syntax gescheitert! :shock:
Ich hätte nicht gedacht, dass sich jemand außer mir noch einmal die Mühe macht, in die Katakomben dieses monströsen XML-Katalogs hinabzusteigen und dort "reverse engineering" zu betreiben...

Chapeau - "ganz großer Sport"! 8-)

Nun werd' ich mal die v. 10.7 bauen...

Schönes Wochenende,
Torsten
WSUSUpdateAdmin
Administrator
 
Posts: 2245
Joined: 07.07.2009, 14:38


Return to Anregungen / Suggestions

Who is online

Users browsing this forum: No registered users and 41 guests