Commit 755fa464 authored by aker@wsusoffline's avatar aker@wsusoffline
Browse files

- Fix: TouchMSITree.cmd/InstallCustomSoftware.cmd could cause an endless loop...

- Fix: TouchMSITree.cmd/InstallCustomSoftware.cmd could cause an endless loop of reboots (Thanks to "rbr555")
parent 8ad92f49
......@@ -14,7 +14,7 @@
#pragma compile(ProductName, "WSUS Offline Update - Community Edition")
#pragma compile(ProductVersion, 12.6.0)
Dim Const $caption = "WSUS Offline Update - Community Edition - 12.6 (b10)"
Dim Const $caption = "WSUS Offline Update - Community Edition - 12.6 (b11)"
Dim Const $title = $caption & " - Generator"
Dim Const $downloadURL = "https://gitlab.com/wsusoffline/"
Dim Const $downloadLogFile = "download.log"
......
......@@ -15,7 +15,7 @@
#pragma compile(ProductName, "WSUS Offline Update - Community Edition")
#pragma compile(ProductVersion, 12.6.0)
Dim Const $caption = "WSUS Offline Update - Community Edition - 12.6 (b10) - Installer"
Dim Const $caption = "WSUS Offline Update - Community Edition - 12.6 (b11) - Installer"
; Registry constants
Dim Const $reg_key_wsh_hklm64 = "HKLM64\Software\Microsoft\Windows Script Host\Settings"
......
......@@ -30,7 +30,7 @@ if "%DIRCMD%" NEQ "" set DIRCMD=
cd /D "%~dp0"
set WSUSOFFLINE_VERSION=12.6 (b10)
set WSUSOFFLINE_VERSION=12.6 (b11)
title %~n0 %*
echo Starting WSUS Offline Update - Community Edition - v. %WSUSOFFLINE_VERSION% at %TIME%...
set UPDATE_LOGFILE=%SystemRoot%\wsusofflineupdate.log
......@@ -1617,26 +1617,40 @@ rem *** Install MSI packages and custom software ***
if exist %SystemRoot%\Temp\wouselmsi.txt (
echo Installing selected MSI packages...
call TouchMSITree.cmd /instselected
rem FIXME (b69)
set ERR_LEVEL=!errorlevel!
rem echo DoUpdate: ERR_LEVEL=!ERR_LEVEL!
call :Log "Info: Installed selected MSI packages"
del %SystemRoot%\Temp\wouselmsi.txt
set REBOOT_REQUIRED=1
rem set REBOOT_REQUIRED=1
) else (
if "%INSTALL_MSI%"=="/instmsi" (
echo Installing all MSI packages...
call TouchMSITree.cmd /install
rem FIXME (b69)
set ERR_LEVEL=!errorlevel!
rem echo DoUpdate: ERR_LEVEL=!ERR_LEVEL!
call :Log "Info: Installed all MSI packages"
set REBOOT_REQUIRED=1
rem set REBOOT_REQUIRED=1
)
)
if "%ERR_LEVEL%"=="3010" (
set REBOOT_REQUIRED=1
) else if "%ERR_LEVEL%"=="3011" (
set RECALL_REQUIRED=1
)
if exist ..\software\custom\InstallCustomSoftware.cmd (
echo Installing custom software...
pushd ..\software\custom
call InstallCustomSoftware.cmd
set ERR_LEVEL=!errorlevel!
rem echo DoUpdate: ERR_LEVEL=!ERR_LEVEL!
popd
call :Log "Info: Executed custom software installation hook (Errorlevel: %errorlevel%)"
rem set REBOOT_REQUIRED=1
)
if "%ERR_LEVEL%"=="3010" (
set REBOOT_REQUIRED=1
) else if "%ERR_LEVEL%"=="3011" (
set RECALL_REQUIRED=1
)
goto UpdateSystem
......
@echo off
rem *** Author: T. Wittrock, Kiel ***
verify other 2>nul
setlocal enableextensions enabledelayedexpansion
if errorlevel 1 goto NoExtensions
set RECALL_REQUIRED=
set REBOOT_REQUIRED=
if "%UPDATE_LOGFILE%"=="" set UPDATE_LOGFILE=%SystemRoot%\wsusofflineupdate.log
for %%i in (listall install instselected) do (
......@@ -13,19 +20,41 @@ if not exist %SystemRoot%\Temp\nul md %SystemRoot%\Temp
if exist "%~dpn1.mst" (
echo Installing %1 using "%~dpn1.mst"...
%SystemRoot%\System32\msiexec.exe /i %1 TRANSFORMS="%~dpn1.mst" /passive /norestart /log "%SystemRoot%\Temp\%~n1.log"
if errorlevel 1 (
echo %DATE% %TIME% - Warning: Installation of %1 using "%~dpn1.mst" failed>>%UPDATE_LOGFILE%
) else (
set ERR_LEVEL=%errorlevel%
rem echo TouchMSITree: ERR_LEVEL=%ERR_LEVEL%
if "%ERR_LEVEL%"=="0" (
echo %DATE% %TIME% - Info: Installed %1 using "%~dpn1.mst">>%UPDATE_LOGFILE%
) else if "%ERR_LEVEL%"=="1641" (
set REBOOT_REQUIRED=1
echo %DATE% %TIME% - Info: Installed %1 using "%~dpn1.mst">>%UPDATE_LOGFILE%
) else if "%ERR_LEVEL%"=="3010" (
set REBOOT_REQUIRED=1
echo %DATE% %TIME% - Info: Installed %1 using "%~dpn1.mst">>%UPDATE_LOGFILE%
)
) else if "%ERR_LEVEL%"=="3011" (
set RECALL_REQUIRED=1
echo %DATE% %TIME% - Info: Installed %1 using "%~dpn1.mst">>%UPDATE_LOGFILE%
) else (
echo %DATE% %TIME% - Warning: Installation of %1 using "%~dpn1.mst" failed>>%UPDATE_LOGFILE%
)
) else (
echo Installing %1...
%SystemRoot%\System32\msiexec.exe /i %1 /passive /norestart /log "%SystemRoot%\Temp\%~n1.log"
if errorlevel 1 (
echo %DATE% %TIME% - Warning: Installation of %1 failed>>%UPDATE_LOGFILE%
) else (
set ERR_LEVEL=%errorlevel%
rem echo TouchMSITree: ERR_LEVEL=%ERR_LEVEL%
if "%ERR_LEVEL%"=="0" (
echo %DATE% %TIME% - Info: Installed %1>>%UPDATE_LOGFILE%
) else if "%ERR_LEVEL%"=="1641" (
set REBOOT_REQUIRED=1
echo %DATE% %TIME% - Info: Installed %1>>%UPDATE_LOGFILE%
) else if "%ERR_LEVEL%"=="3010" (
set REBOOT_REQUIRED=1
echo %DATE% %TIME% - Info: Installed %1>>%UPDATE_LOGFILE%
)
) else if "%ERR_LEVEL%"=="3011" (
set RECALL_REQUIRED=1
echo %DATE% %TIME% - Info: Installed %1>>%UPDATE_LOGFILE%
) else (
echo %DATE% %TIME% - Warning: Installation of %1 failed>>%UPDATE_LOGFILE%
)
)
goto :eof
......@@ -46,11 +75,30 @@ if /i "%1"=="/listall" (
)
goto EoF
:NoExtensions
echo ERROR: No command extensions available.
goto Error
:InvalidParam
echo.
echo ERROR: Invalid parameter: %1
echo Usage: %~n0 {/listall ^| /install ^| /instselected}
echo %DATE% %TIME% - Error: Invalid parameter: %1>>%UPDATE_LOGFILE%
echo.
goto Error
:Error
endlocal
exit /b 1
:EoF
if "%RECALL_REQUIRED%"=="1" (
endlocal
exit /b 3011
) else if "%REBOOT_REQUIRED%"=="1" (
endlocal
exit /b 3010
) else (
endlocal
exit /b 0
)
......@@ -35,7 +35,7 @@ if "%DIRCMD%" NEQ "" set DIRCMD=
cd /D "%~dp0"
set WSUSOFFLINE_VERSION=12.6 (b10)
set WSUSOFFLINE_VERSION=12.6 (b11)
title %~n0 %1 %2 %3 %4 %5 %6 %7 %8 %9
echo Starting WSUS Offline Update - Community Edition - download v. %WSUSOFFLINE_VERSION% for %1 %2...
set DOWNLOAD_LOGFILE=..\log\download.log
......
......@@ -1828,3 +1828,4 @@ Community Edition 12.6 -- ??.??.????
- Replaced superseded May 2021 Servicing stack update (kb5003243) by June 2021 Servicing stack update (kb5003711) for Windows 10 Version 1809 and Windows Server 2019 (Thanks to "aker")
- Replaced superseded May 2021 Servicing stack update (kb5003244) by 15th June 2021 Servicing stack update (kb5003974) for Windows 10 Version 1909 (Thanks to "aker")
- Fix: The self-update errornously reported a more recent versions in UpdateGenerator when the update check fails (Thanks to "negg")
- Fix: TouchMSITree.cmd/InstallCustomSoftware.cmd could cause an endless loop of reboots (Thanks to "rbr555")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment