Commit 30d4e5fb authored by aker@wsusoffline's avatar aker@wsusoffline
Browse files

prepare w100 build-specific downloads

parent feeed902
......@@ -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 (b19)"
Dim Const $caption = "WSUS Offline Update - Community Edition - 12.6 (b20)"
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 (b19) - Installer"
Dim Const $caption = "WSUS Offline Update - Community Edition - 12.6 (b20) - Installer"
; Registry constants
Dim Const $reg_key_wsh_hklm64 = "HKLM64\Software\Microsoft\Windows Script Host\Settings"
......
......@@ -56,7 +56,7 @@ Private Const idxBuild = 2
Dim wshShell, objFileSystem, objCmdFile, objWMIService, objQueryItem, objFolder, strFilePathMSEdge, strFilePathMSEdgeUpdate, objInstaller, arrayOfficeNames, arrayOfficeVersions, arrayOfficeAppNames, arrayOfficeExeNames
Dim strSystemFolder, strTempFolder, strProfileFolder, strWUAFileName, strMSIFileName, strWSHFileName, strCmdFileName
Dim strOSArchitecture, strBuildLabEx, strUBR, strInstallationType, strOfficeInstallPath, strOfficeExeVersion, strStaticId, strProduct, strPatch, languageCode, i, j
Dim ServicingStack_Major, ServicingStack_Minor, ServicingStack_Build, ServicingStack_Revis, ServicingStack_OSVer_Major, ServicingStack_OSVer_Minor, ServicingStack_OSVer_Build
Dim ServicingStack_Major, ServicingStack_Minor, ServicingStack_Build, ServicingStack_Revis, OSVer_Real_Major, OSVer_Real_Minor, OSVer_Real_Build
Dim cpp2005_x86_old_ids, cpp2005_x86_new_ids, cpp2005_x64_old_ids, cpp2005_x64_new_ids
Dim cpp2008_x86_old_ids, cpp2008_x86_new_ids, cpp2008_x64_old_ids, cpp2008_x64_new_ids
'Dim cpp2010_x86_old_ids, cpp2010_x86_new_ids, cpp2010_x64_old_ids, cpp2010_x64_new_ids
......@@ -448,17 +448,22 @@ For Each objQueryItem in objWMIService.ExecQuery("Select * from Win32_OperatingS
WriteVersionToFile objCmdFile, "OS_VER", objQueryItem.Version & Mid(strBuildLabEx, InStr(strBuildLabEx, "."), InStr(InStr(strBuildLabEx, ".") + 1, strBuildLabEx, ".") - InStr(strBuildLabEx, "."))
End If
End If
ServicingStack_OSVer_Major = CInt(Split(objQueryItem.Version, ".")(0))
ServicingStack_OSVer_Minor = CInt(Split(objQueryItem.Version, ".")(1))
OSVer_Real_Major = CInt(Split(objQueryItem.Version, ".")(0))
OSVer_Real_Minor = CInt(Split(objQueryItem.Version, ".")(1))
If Split(objQueryItem.Version, ".")(2) = "18363" Then
ServicingStack_OSVer_Build = 18362
OSVer_Real_Build = 18362
ElseIf Split(objQueryItem.Version, ".")(2) = "19042" Then
ServicingStack_OSVer_Build = 19041
OSVer_Real_Build = 19041
ElseIf Split(objQueryItem.Version, ".")(2) = "19043" Then
ServicingStack_OSVer_Build = 19041
OSVer_Real_Build = 19041
ElseIf Split(objQueryItem.Version, ".")(2) = "19044" Then
OSVer_Real_Build = 19041
ElseIf Split(objQueryItem.Version, ".")(2) = "19045" Then
OSVer_Real_Build = 19041
Else
ServicingStack_OSVer_Build = CInt(Split(objQueryItem.Version, ".")(2))
OSVer_Real_Build = CInt(Split(objQueryItem.Version, ".")(2))
End If
objCmdFile.WriteLine("set OS_VER_BUILD_INTERNAL=" & OSVer_Real_Build)
objCmdFile.WriteLine("set OS_LANG_CODE=0x" & Hex(objQueryItem.OSLanguage))
WriteLanguageToFile objCmdFile, "OS_LANG", objQueryItem.OSLanguage, True, True
strInstallationType = RegRead(wshShell, strRegKeyWindowsVersion & strRegValInstallationType)
......@@ -517,13 +522,13 @@ Next
objCmdFile.WriteLine("set FS_TYPE=" & objFileSystem.GetDrive(objFileSystem.GetDriveName(wshShell.CurrentDirectory)).FileSystem)
' Determine Servicing Stack version
If ServicingStack_OSVer_Major >= 6 Then
If OSVer_Real_Major >= 6 Then
ServicingStack_Major = 0
ServicingStack_Minor = 0
ServicingStack_Build = 0
ServicingStack_Revis = 0
For Each objFolder In objFileSystem.GetFolder(wshShell.ExpandEnvironmentStrings("%SystemRoot%") & "\servicing\Version").SubFolders
If (CInt(Split(objFolder.Name, ".")(0)) = ServicingStack_OSVer_Major) And (CInt(Split(objFolder.Name, ".")(1)) = ServicingStack_OSVer_Minor) And ((ServicingStack_OSVer_Major = 6) Or (CInt(Split(objFolder.Name, ".")(2)) = ServicingStack_OSVer_Build)) Then
If (CInt(Split(objFolder.Name, ".")(0)) = OSVer_Real_Major) And (CInt(Split(objFolder.Name, ".")(1)) = OSVer_Real_Minor) And ((OSVer_Real_Major = 6) Or (CInt(Split(objFolder.Name, ".")(2)) = OSVer_Real_Build)) Then
If CInt(Split(objFolder.Name, ".")(0)) > ServicingStack_Major Then
ServicingStack_Major = CInt(Split(objFolder.Name, ".")(0))
ServicingStack_Minor = CInt(Split(objFolder.Name, ".")(1))
......
......@@ -30,7 +30,7 @@ if "%DIRCMD%" NEQ "" set DIRCMD=
cd /D "%~dp0"
set WSUSOFFLINE_VERSION=12.6 (b19)
set WSUSOFFLINE_VERSION=12.6 (b20)
title %~n0 %*
echo Starting WSUS Offline Update - Community Edition - v. %WSUSOFFLINE_VERSION% at %TIME%...
set UPDATE_LOGFILE=%SystemRoot%\wsusofflineupdate.log
......
......@@ -141,6 +141,9 @@ for /F "usebackq tokens=1,2 delims=," %%i in ("%TEMP%\MissingUpdateIds.txt") do
if exist ..\UpdateTable\UpdateTable-%OS_NAME%-%%k.csv (
for /F "tokens=1,2 delims=," %%l in (..\UpdateTable\UpdateTable-%OS_NAME%-%%k.csv) do (
if "%%l"=="%%j" (
if "%OS_NAME%"=="w100" (
if exist "..\%OS_SEARCH_DIR%\%%k\%OS_VER_BUILD_INTERNAL%" (call ListUpdateFile.cmd %%m ..\%OS_SEARCH_DIR%\%%k\%OS_VER_BUILD_INTERNAL% /searchleftmost /append)
)
call ListUpdateFile.cmd %%m ..\%OS_SEARCH_DIR%\%%k /searchleftmost /append
)
)
......@@ -172,6 +175,17 @@ for /F "usebackq tokens=1,2 delims=," %%i in ("%TEMP%\MissingUpdateIds.txt") do
rem statisch definierte Windows-Updates als CAB/MSU/...
if not exist "%TEMP%\Update.txt" (
for %%l in (%OS_LANG% glb) do (
if "%OS_NAME%"=="w100" (
if exist "..\%OS_SEARCH_DIR%\%%l\%OS_VER_BUILD_INTERNAL%" (
if %IE_VER_MAJOR%%IE_VER_MINOR%0 GEQ 9100 (
call ListUpdateFile.cmd ie%IE_VER_MINOR%-*%%i ..\%OS_SEARCH_DIR%\%%l\%OS_VER_BUILD_INTERNAL%
) else (
call ListUpdateFile.cmd ie%IE_VER_MAJOR%-*%%i ..\%OS_SEARCH_DIR%\%%l\%OS_VER_BUILD_INTERNAL%
)
call ListUpdateFile.cmd windows*%%i ..\%OS_SEARCH_DIR%\%%l\%OS_VER_BUILD_INTERNAL% /searchleftmost
call ListUpdateFile.cmd %%i ..\%OS_SEARCH_DIR%\%%l\%OS_VER_BUILD_INTERNAL%
)
)
if %IE_VER_MAJOR%%IE_VER_MINOR%0 GEQ 9100 (
call ListUpdateFile.cmd ie%IE_VER_MINOR%-*%%i ..\%OS_SEARCH_DIR%\%%l
) else (
......
......@@ -35,7 +35,7 @@ if "%DIRCMD%" NEQ "" set DIRCMD=
cd /D "%~dp0"
set WSUSOFFLINE_VERSION=12.6 (b19)
set WSUSOFFLINE_VERSION=12.6 (b20)
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
......@@ -1313,6 +1313,35 @@ rem *** Determine update urls for %1 %2 ***
title %~n0 %1 %2 %3 %4 %5 %6 %7 %8 %9
echo.
set TMP_PLATFORM=%1
if "%TMP_PLATFORM:~-4%"=="-x64" (
set TMP_PLATFORM=%TMP_PLATFORM:~0,-4%
)
if "%TMP_PLATFORM%"=="w100" (
if exist ..\Windows10Versions.ini (
for /f "skip=1 tokens=1-3 delims=_= " %%i in (..\Windows10Versions.ini) do (
if "%%j"=="%3" (
if /i "%%k"=="Enabled" (
if "!TMP_BUILDS_ENABLED!"=="" (set TMP_BUILDS_ENABLED=%%i) else (set TMP_BUILDS_ENABLED=!TMP_BUILDS_ENABLED! %%i)
)
)
)
) else (
set TMP_BUILDS_ENABLED=10240 14393 17763 18362 19041
)
set TMP_BUILDS_DISABLED=
for %%i in (10240 14393 17763 18362 19041) do (
echo "!TMP_BUILDS_ENABLED!" | find "%%i" >nul 2>&1
if errorlevel 1 (
if "!TMP_BUILDS_DISABLED!"=="" (set TMP_BUILDS_DISABLED=%%i) else (set TMP_BUILDS_DISABLED=!TMP_BUILDS_DISABLED! %%i)
)
)
) else (
set TMP_BUILDS_ENABLED=
set TMP_BUILDS_DISABLED=
)
if "%SECONLY%"=="1" (
set SUSED_LIST=..\exclude\ExcludeList-superseded-seconly.txt
) else (
......@@ -1597,11 +1626,6 @@ if exist ..\client\md\hashes-%1-%2.txt (
:SkipAudit
if exist ..\client\md\hashes-%1-%2.txt del ..\client\md\hashes-%1-%2.txt
set TMP_PLATFORM=%1
if "%TMP_PLATFORM:~-4%"=="-x64" (
set TMP_PLATFORM=%TMP_PLATFORM:~0,-4%
)
rem *** Determine static update urls for %1 %2 ***
if "%EXC_STATICS%"=="1" goto SkipStatics
echo Determining static update urls for %1 %2...
......@@ -1609,14 +1633,10 @@ if exist ..\static\StaticDownloadLinks-%1-%2.txt copy /Y ..\static\StaticDownloa
if exist ..\static\StaticDownloadLinks-%1-%3-%2.txt copy /Y ..\static\StaticDownloadLinks-%1-%3-%2.txt "%TEMP%\StaticDownloadLinks-%1-%2.txt" >nul
rem *** Windows 10 version specific static links ***
if "%TMP_PLATFORM%"=="w100" (
if exist ..\Windows10Versions.ini (
for /f "skip=1 tokens=1-3 delims=_= " %%i in (..\Windows10Versions.ini) do (
if "%%j"=="%3" (
if /i "%%k"=="Enabled" (
if exist ..\static\StaticDownloadLinks-w100-%%i-%3-%2.txt type ..\static\StaticDownloadLinks-w100-%%i-%3-%2.txt >>"%TEMP%\StaticDownloadLinks-%1-%2.txt"
if exist ..\static\custom\StaticDownloadLinks-w100-%%i-%3-%2.txt type ..\static\custom\StaticDownloadLinks-w100-%%i-%3-%2.txt >>"%TEMP%\StaticDownloadLinks-%1-%2.txt"
)
)
if not "%TMP_BUILDS_ENABLED%"=="" (
for %%i in (%TMP_BUILDS_ENABLED%) do (
if exist ..\static\StaticDownloadLinks-w100-%%i-%3-%2.txt type ..\static\StaticDownloadLinks-w100-%%i-%3-%2.txt >>"%TEMP%\StaticDownloadLinks-%1-%2.txt"
if exist ..\static\custom\StaticDownloadLinks-w100-%%i-%3-%2.txt type ..\static\custom\StaticDownloadLinks-w100-%%i-%3-%2.txt >>"%TEMP%\StaticDownloadLinks-%1-%2.txt"
)
)
)
......@@ -1832,14 +1852,10 @@ if "%TMP_PLATFORM%"=="w63" (
)
if "%TMP_PLATFORM%"=="w100" (
if exist ..\Windows10Versions.ini (
for /f "skip=1 tokens=1-3 delims=_= " %%i in (..\Windows10Versions.ini) do (
if "%%j"=="%3" (
if /i "%%k"=="Disabled" (
if exist ..\exclude\ExcludeList-w100-%%i.txt type ..\exclude\ExcludeList-w100-%%i.txt >>"%TEMP%\ExcludeList-%1.txt"
if exist ..\exclude\custom\ExcludeList-w100-%%i.txt type ..\exclude\custom\ExcludeList-w100-%%i.txt >>"%TEMP%\ExcludeList-%1.txt"
)
)
if not "%TMP_BUILDS_DISABLED%"=="" (
for %%i in (%TMP_BUILDS_DISABLED%) do (
if exist ..\exclude\ExcludeList-w100-%%i.txt type ..\exclude\ExcludeList-w100-%%i.txt >>"%TEMP%\ExcludeList-%1.txt"
if exist ..\exclude\custom\ExcludeList-w100-%%i.txt type ..\exclude\custom\ExcludeList-w100-%%i.txt >>"%TEMP%\ExcludeList-%1.txt"
)
)
)
......
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