statische Updates für Office

statische Updates für Office

Postby aker » 12.08.2013, 09:25

Im Anschluss an dieses Thema fällt mir beim Durchsehen des Codes auf, dass nicht nur - wie dort beschrieben - Service Packs für ältere Office Versionen vergessen werden, wenn eine neuere Version installiert ist, sondern selbiges auch bei den statisch definierten Updates geschieht.

vgl. ListUpdatesToInstall.cmd (r484):
Code: Select all
if exist ..\static\StaticUpdateIds-%OFC_NAME%.txt call :EvalStatics ..\static\StaticUpdateIds-%OFC_NAME%.txt
if exist ..\static\custom\StaticUpdateIds-%OFC_NAME%.txt call :EvalStatics ..\static\custom\StaticUpdateIds-%OFC_NAME%.txt


Wären in diesem Beispiel Office 2003 und 2010 installiert, würden nur die für 2010 statisch definierten Updates als zu installierend erkannt werden.
"%OFC_NAME%" wäre in diesem Fall "o2k10", sodass eine Datei "..\static\custom\StaticUpdateIds-o2k3.txt" selbst bei installiertem Office 2003 ignoriert würde.


[edit]
Spontan, würde ich einen Fix in Richtung
Code: Select all
rem ofc-Fix
if "%O2K3_VER_MAJOR%"=="" goto SkipStaticso2k3
if exist ..\static\StaticUpdateIds-o2k3.txt call :EvalStatics ..\static\StaticUpdateIds-o2k3.txt
if exist ..\static\custom\StaticUpdateIds-o2k3.txt call :EvalStatics ..\static\custom\StaticUpdateIds-%o2k3.txt
:SkipStaticso2k3
if "%O2K7_VER_MAJOR%"=="" goto SkipStaticso2k7
if exist ..\static\StaticUpdateIds-o2k7.txt call :EvalStatics ..\static\StaticUpdateIds-o2k7.txt
if exist ..\static\custom\StaticUpdateIds-o2k7.txt call :EvalStatics ..\static\custom\StaticUpdateIds-o2k7.txt
:SkipStaticso2k7
if "%O2K10_VER_MAJOR%"=="" goto SkipStaticso2k10
if exist ..\static\StaticUpdateIds-o2k10.txt call :EvalStatics ..\static\StaticUpdateIds-o2k10.txt
if exist ..\static\custom\StaticUpdateIds-o2k10.txt call :EvalStatics ..\static\custom\StaticUpdateIds-o2k10.txt
:SkipStaticso2k10
if "%O2K13_VER_MAJOR%"=="" goto SkipStaticso2k13
if exist ..\static\StaticUpdateIds-o2k13.txt call :EvalStatics ..\static\StaticUpdateIds-o2k13.txt
if exist ..\static\custom\StaticUpdateIds-o2k13.txt call :EvalStatics ..\static\custom\StaticUpdateIds-o2k13.txt
:SkipStaticso2k13
if exist ..\static\StaticUpdateIds-ofc.txt call :EvalStatics ..\static\StaticUpdateIds-ofc.txt
if exist ..\static\custom\StaticUpdateIds-ofc.txt call :EvalStatics ..\static\custom\StaticUpdateIds-ofc.txt

vorschlagen. (Kann wahrscheinlich optimaler gestaltet werden, es ist nur ein auf die Schnelle geschriebener Bugfix)
[/edit]

[edit2]
Aufgrund des Befehls
Code: Select all
goto OFCNV%OFC_NAME%

in der DoUpdate.cmd, sollte dasselbe auch für die Office Konverter gelten.
[/edit2]

Viele Grüße
Last edited by aker on 12.08.2013, 09:44, edited 2 times in total.
Reason: Codevorschlag hinzugefügt
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: statische Updates für Office

Postby WSUSUpdateAdmin » 12.08.2013, 14:05

Moin aker,

das ist (leider ;)) völlig richtig.
Fixed in http://trac.wsusoffline.net/browser/trunk (r485).

Danke für Deine Aufmerksamkeit! :)

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

Re: statische Updates für Office

Postby aker » 13.08.2013, 09:31

Nachdem dieses seltsame Verhalten nun an zwei Stellen von wsusou aufgetreten ist, habe ich mir den gesamten Code des Installers noch einmal angesehen und dabei festgestellt, dass ähnliche Verhaltensweisen in zwei anderen Situationen auch auftreten können. Hier die Stellen, die mir aufgefallen sind:

1) Das 2007 Office Compatibility Pack
Bei einer Kombination aus Access 2007 Englisch und Office 2003 Deutsch würde wsusou versuchen ein englisches Copatibility Pack zu installieren.
Ausschnitt aus der DoUpdate.cmd
Code: Select all
if "%OFC_COMP_PACK%" NEQ "1" (
  if exist ..\ofc\%OFC_LANG%\FileFormatConverters.exe (
    echo Installing Office Compatibility Pack...
    call InstallOfficeUpdate.cmd ..\ofc\%OFC_LANG%\FileFormatConverters.exe /selectoptions %VERIFY_MODE% /errorsaswarnings
    echo %DATE% %TIME% - Info: Installed Office Compatibility Pack >>%UPDATE_LOGFILE%
  ) else (
    echo Warning: File ..\ofc\%OFC_LANG%\FileFormatConverters.exe not found.
    echo %DATE% %TIME% - Warning: File ..\ofc\%OFC_LANG%\FileFormatConverters.exe not found >>%UPDATE_LOGFILE%
  )
  dir /B ..\ofc\%OFC_LANG%\compatibilitypacksp*.exe >nul 2>&1
  if errorlevel 1 (
    echo Warning: File ..\ofc\%OFC_LANG%\compatibilitypacksp*.exe not found.
    echo %DATE% %TIME% - Warning: File ..\ofc\%OFC_LANG%\compatibilitypacksp*.exe not found >>%UPDATE_LOGFILE%
  ) else (
    for /F %%i in ('dir /B ..\ofc\%OFC_LANG%\compatibilitypacksp*.exe') do (
      echo Installing most recent Service Pack for Office Compatibility Pack...
      call InstallOfficeUpdate.cmd ..\ofc\%OFC_LANG%\%%i /selectoptions %VERIFY_MODE% /errorsaswarnings
      echo %DATE% %TIME% - Info: Installed most recent Service Pack for Office Compatibility Pack >>%UPDATE_LOGFILE%
    )
  )
)

ein möglicher Fix wäre
Code: Select all
if "%OFC_COMP_PACK%" NEQ "1" (
  if exist ..\ofc\%O2K3_LANG%\FileFormatConverters.exe (
    echo Installing Office Compatibility Pack...
    call InstallOfficeUpdate.cmd ..\ofc\%O2K3_LANG%\FileFormatConverters.exe /selectoptions %VERIFY_MODE% /errorsaswarnings
    echo %DATE% %TIME% - Info: Installed Office Compatibility Pack >>%UPDATE_LOGFILE%
  ) else (
    echo Warning: File ..\ofc\%OFC_LANG%\FileFormatConverters.exe not found.
    echo %DATE% %TIME% - Warning: File ..\ofc\%O2K3_LANG%\FileFormatConverters.exe not found >>%UPDATE_LOGFILE%
  )
  dir /B ..\ofc\%OFC_LANG%\compatibilitypacksp*.exe >nul 2>&1
  if errorlevel 1 (
    echo Warning: File ..\ofc\%O2K3_LANG%\compatibilitypacksp*.exe not found.
    echo %DATE% %TIME% - Warning: File ..\ofc\%O2K3_LANG%\compatibilitypacksp*.exe not found >>%UPDATE_LOGFILE%
  ) else (
    for /F %%i in ('dir /B ..\ofc\%O2K3_LANG%\compatibilitypacksp*.exe') do (
      echo Installing most recent Service Pack for Office Compatibility Pack...
      call InstallOfficeUpdate.cmd ..\ofc\%O2K3_LANG%\%%i /selectoptions %VERIFY_MODE% /errorsaswarnings
      echo %DATE% %TIME% - Info: Installed most recent Service Pack for Office Compatibility Pack >>%UPDATE_LOGFILE%
    )
  )
)


2) ein PC mit Office Versionen verschiedener Sprachen
Office 2010 Englisch und Office 2003 Deutsch
Auszug aus ListUpdatesToInstall.cmd
Code: Select all
    if not exist "%TEMP%\Update.txt" (
      for %%k in (%OFC_NAME% ofc o2k3 o2k7 o2k10 o2k13) do (
        for %%l in (%OFC_LANG% glb) do (
          call ListUpdateFile.cmd %%i*%OFC_ARCH% ..\%%k\%%l
          call ListUpdateFile.cmd %%i ..\%%k\%%l
        )
      )
    )

"%OFC_LANG%" wäre in diesem Fall "enu" und die deutschen o2k3 Updates würden nicht korrekt ermittelt.
Diese Zeile
Code: Select all
for %%k in (%OFC_NAME% ofc o2k3 o2k7 o2k10 o2k13) do (
verarbeitet einiges doppelt; auch dieser Befehl
Code: Select all
for %%k in (ofc o2k3 o2k7 o2k10 o2k13) do (
sollte vollkommen ausreichen, da "%OFC_NAME%" sowieso nur die Werte "ofc", "o2k3", "o2k7", "o2k10" oder "o2k13" annehmen würde.

Viele Grüße
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: statische Updates für Office

Postby WSUSUpdateAdmin » 13.08.2013, 20:15

Ja.

Das Ganze ist ja "historisch gewachsen" und zu einer Zeit entstanden, als auch Microsoft noch keine dualen Office-Installationen unterstützte (mit Office 2007 eingeführt) und WOU demzufolge auch nicht.

Wenn nun solche exotischen Konfigurationen wie
aker wrote:[...]Access 2007 Englisch und Office 2003 Deutsch[...]

oder
aker wrote:Office 2010 Englisch und Office 2003 Deutsch

als Beispiele dafür dienen sollen, dass WOU bezüglich statisch definierter Updates nicht erwartungsgemäß funktioniert, sage ich: Darüber hat sich noch niemand beschwert, oder: So, what? :)

Zu:
aker wrote:Diese Zeile
Code: Select all
for %%k in (%OFC_NAME% ofc o2k3 o2k7 o2k10 o2k13) do (
verarbeitet einiges doppelt; auch dieser Befehl
Code: Select all
for %%k in (ofc o2k3 o2k7 o2k10 o2k13) do (
sollte vollkommen ausreichen, da "%OFC_NAME%" sowieso nur die Werte "ofc", "o2k3", "o2k7", "o2k10" oder "o2k13" annehmen würde.

Klar, aber da geht es schlicht um [EDIT](war spät gestern ;)) "speziell vor allgemein"[/EDIT].

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


Return to Installation / Updating

Who is online

Users browsing this forum: No registered users and 39 guests