Browse Source

20230805

pull/48/head
abbodi1406 2 years ago
parent
commit
369177153c
  1. 62
      OfficeScrubber/OfficeScrubber.cmd
  2. 2
      OfficeScrubber/README.md
  3. 51
      OfficeScrubber/bin/CleanOffice.txt
  4. BIN
      OfficeScrubber/bin/x64/cleanospp.exe
  5. BIN
      OfficeScrubber/bin/x64/msvcr100.dll
  6. BIN
      OfficeScrubber/bin/x86/cleanospp.exe
  7. BIN
      OfficeScrubber/bin/x86/msvcr100.dll
  8. 168
      W10MUI/Updates/W10UI.cmd
  9. 12
      W10MUI/W10MUI.cmd
  10. 12
      W10MUI/W10MUI_Mini.cmd
  11. 16
      W10UI/README.md
  12. 168
      W10UI/W10UI.cmd
  13. 152
      W7ESUI/README.md
  14. 1493
      W7ESUI/W7ESUI.cmd
  15. 15
      W7ESUI/W7ESUI.ini
  16. 141
      W81ESUI/README.md
  17. 1418
      W81ESUI/W81ESUI.cmd
  18. 15
      W81ESUI/W81ESUI.ini
  19. 3
      WHD-W8.1UI/README.md
  20. 24
      WHD-W8.1UI/WHD-W81UI.cmd
  21. 2
      uup-converter-wimlib/ConvertConfig.ini
  22. 30
      uup-converter-wimlib/ReadMe.html
  23. 166
      uup-converter-wimlib/convert-UUP.cmd

62
OfficeScrubber/OfficeScrubber.cmd

@ -88,12 +88,8 @@ set "_Local=%LocalAppData%" @@ -88,12 +88,8 @@ set "_Local=%LocalAppData%"
set "_cscript=cscript //Nologo //B"
setlocal EnableDelayedExpansion
pushd "!_work!"
if not exist "%xBit%\cleanospp.exe" (
set "msg=ERROR: required file cleanospp.exe is missing"
goto :TheEnd
)
for %%# in (OffScrubC2R,OffScrub_O16msi,OffScrub_O15msi,OffScrub10,OffScrub07,OffScrub03) do (
if not exist ".\%%#.vbs" (set "msg=ERROR: required file %%# is missing"&goto :TheEnd)
for %%# in (OffScrubC2R.vbs,OffScrub_O16msi.vbs,OffScrub_O15msi.vbs,OffScrub10.vbs,OffScrub07.vbs,OffScrub03.vbs,CleanOffice.txt) do (
if not exist ".\%%#" (set "msg=ERROR: required file %%# is missing"&goto :TheEnd)
)
set "_Nul1=1>nul"
set "_Nul2=2>nul"
@ -103,7 +99,7 @@ set "_Nul3=1>nul 2>nul" @@ -103,7 +99,7 @@ set "_Nul3=1>nul 2>nul"
title Office Scrubber
echo.
echo ============================================================
echo Detecting Office versions, please wait...
echo Detecting Office versions, please wait . . .
set OsppHook=1
sc query osppsvc %_Nul3%
@ -211,7 +207,7 @@ if %_er% EQU 5 goto :sOM14 @@ -211,7 +207,7 @@ if %_er% EQU 5 goto :sOM14
if %_er% EQU 4 goto :sOM15
if %_er% EQU 3 goto :sOM16
if %_er% EQU 2 goto :sOCTR
if %_er% EQU 1 goto :mALL
if %_er% EQU 1 set tOCTR=1&set tOM16=1&goto :mALL
goto :Menu
:mALL
@ -242,8 +238,7 @@ if %winbuild% GEQ 10240 echo [8] Office UWP : %aOUWP% @@ -242,8 +238,7 @@ if %winbuild% GEQ 10240 echo [8] Office UWP : %aOUWP%
echo.
echo -------
echo Notice:
echo It's recommended to only scrub detected versions {*}
echo selecting all is not necessary and will take a long time.
echo Manually selecting all is not necessary and will take a long time.
echo.
echo ============================================================
choice /c 123456780 /n /m "Change menu options, or press 0 to Exit: "
@ -267,8 +262,7 @@ goto :eof @@ -267,8 +262,7 @@ goto :eof
:sOALL
call :Hdr
echo.
echo Uninstall Product Keys
%xBit%\cleanospp.exe -PKey %_Nul3%
echo Uninstalling Product Keys . . .
call :cKMS %_Nul3%
if %tOCTR% EQU 1 call :rOCTR
if %tOUWP% EQU 1 if %_pwsh% EQU 1 call :rOUWP
@ -326,16 +320,16 @@ goto :TheEnd @@ -326,16 +320,16 @@ goto :TheEnd
:rOCTR
if exist "!_file!" (
echo.
echo Execute OfficeClickToRun.exe
echo Executing OfficeClickToRun.exe . . .
%_Nul3% start "" /WAIT "!_file!" platform=%_plat% productstoremove=AllProducts displaylevel=False
)
if exist "!_fil2!" if /i "%PROCESSOR_ARCHITECTURE%"=="arm64" (
echo.
echo Execute OfficeClickToRun.exe
echo Executing OfficeClickToRun.exe . . .
%_Nul3% start "" /WAIT "!_fil2!" platform=%_plat% productstoremove=AllProducts displaylevel=False
)
echo.
echo Scrub Office C2R
echo Scrubbing Office C2R . . .
for %%A in (16,19,21) do call :cKpp %%A
if %_O15CTR% EQU 1 call :cKpp 15
%_Nul3% %_cscript% OffScrubC2R.vbs ALL /QUIET /OFFLINE
@ -345,14 +339,14 @@ goto :eof @@ -345,14 +339,14 @@ goto :eof
:rOUWP
echo.
echo Remove Office UWP Apps
echo Removing Office UWP Apps . . .
%_Nul3% %_psc% "Get-AppXPackage -Name '*Microsoft.Office.Desktop*' | Foreach {Remove-AppxPackage $_.PackageFullName}"
%_Nul3% %_psc% "Get-AppXProvisionedPackage -Online | Where DisplayName -Like '*Microsoft.Office.Desktop*' | Remove-AppXProvisionedPackage -Online"
goto :eof
:rOM16
echo.
echo Scrub Office 2016 MSI
echo Scrubbing Office 2016 MSI . . .
call :cKpp 16
%_Nul3% %_cscript% OffScrub_O16msi.vbs %_para%
%_Nul3% call :officeREG 16
@ -360,7 +354,7 @@ goto :eof @@ -360,7 +354,7 @@ goto :eof
:rOM15
echo.
echo Scrub Office 2013 MSI
echo Scrubbing Office 2013 MSI . . .
call :cKpp 15
%_Nul3% %_cscript% OffScrub_O15msi.vbs %_para%
%_Nul3% call :officeREG 15
@ -368,7 +362,7 @@ goto :eof @@ -368,7 +362,7 @@ goto :eof
:rOM14
echo.
echo Scrub Office 2010
echo Scrubbing Office 2010 . . .
call :cK14
%_Nul3% %_cscript% OffScrub10.vbs %_para%
%_Nul3% call :officeREG 14
@ -376,27 +370,32 @@ goto :eof @@ -376,27 +370,32 @@ goto :eof
:rOM12
echo.
echo Scrub Office 2007
echo Scrubbing Office 2007 . . .
%_Nul3% %_cscript% OffScrub07.vbs %_para%
%_Nul3% call :officeREG 12
goto :eof
:rOM11
echo.
echo Scrub Office 2003
echo Scrubbing Office 2003 . . .
%_Nul3% %_cscript% OffScrub03.vbs %_para%
%_Nul3% call :officeREG 11
goto :eof
:cSPP
%xBit%\cleanospp.exe %_Nul3%
call :oppcln
call :slmgr
goto :eof
:oppcln
%_Nul3% powershell -ep unrestricted -nop -c "cd -Lit ($env:__CD__); $f=[IO.File]::ReadAllText('.\CleanOffice.txt') -split ':embed\:.*'; iex ($f[1])"
title Office Scrubber
goto :eof
:slmgr
if exist "%SysPath%\spp\store_test\2.0\tokens.dat" (
echo.
echo Refresh Windows Insider Preview Licenses
echo Refresh Windows Insider Preview Licenses . . .
%_cscript% %SysPath%\slmgr.vbs /rilc %_Nul3%
if !ERRORLEVEL! NEQ 0 %_cscript% %SysPath%\slmgr.vbs /rilc %_Nul3%
)
@ -503,7 +502,7 @@ goto :eof @@ -503,7 +502,7 @@ goto :eof
:LcnsC
call :Hdr
echo.
echo Clean vNext Licenses
echo Cleaning vNext Licenses . . .
%_Nul3% call :vNextDir
%_Nul3% call :vNextREG
set "msg=Done."
@ -512,8 +511,7 @@ goto :TheEnd @@ -512,8 +511,7 @@ goto :TheEnd
:KeysU
call :Hdr
echo.
echo Uninstall Product Keys
%xBit%\cleanospp.exe -PKey %_Nul3%
echo Uninstalling Product Keys . . .
for %%A in (15,16,19,21) do call :cKpp %%A
set "msg=Done."
goto :TheEnd
@ -521,8 +519,8 @@ goto :TheEnd @@ -521,8 +519,8 @@ goto :TheEnd
:LcnsR
call :Hdr
echo.
echo Remove Office Licenses
%xBit%\cleanospp.exe -Licenses %_Nul3%
echo Removing Office Licenses . . .
call :oppcln
call :slmgr
set "msg=Done."
goto :TheEnd
@ -530,7 +528,7 @@ goto :TheEnd @@ -530,7 +528,7 @@ goto :TheEnd
:LcnsT
call :Hdr
echo.
echo Reset Office C2R Licenses
echo Resetting Office C2R Licenses . . .
if %_O16CTR% equ 0 (
set "msg=ERROR: No installed Office ClickToRun detected."
goto :TheEnd
@ -559,11 +557,11 @@ set "msg=ERROR: Could not detect originally installed Office Products." @@ -559,11 +557,11 @@ set "msg=ERROR: Could not detect originally installed Office Products."
goto :TheEnd
)
echo.
echo Remove Office Licenses
%xBit%\cleanospp.exe -Licenses %_Nul3%
echo Removing Office Licenses . . .
call :oppcln
call :slmgr
echo.
echo Install Office C2R Licenses
echo Installing Office C2R Licenses . . .
for %%a in (%_SKUs%) do (
"!_Integrator!" /R /License PRIDName=%%a.16 PackageGUID="%_GUID%" PackageRoot="!_InstallRoot!" %_Nul1%
)

2
OfficeScrubber/README.md

@ -10,7 +10,7 @@ Additionally, if you uninstalled Office 2013+ normally on Windows 8 or later, th @@ -10,7 +10,7 @@ Additionally, if you uninstalled Office 2013+ normally on Windows 8 or later, th
## Scrub ALL Overview
* By default, this operation will remove the detected Office versions only
* By default, this operation will remove remove detected versions only, and Office C2R/2016
in addition to uninstalling product keys, and clean licenses leftovers
* However, you can use the numbers 2-8 to toggle the state for menu options

51
OfficeScrubber/bin/CleanOffice.txt

@ -0,0 +1,51 @@ @@ -0,0 +1,51 @@
@exit /b
:embed:
function UninstallLicenses($DllPath) {
$DynAssembly = New-Object System.Reflection.AssemblyName('Win32Lib')
$AssemblyBuilder = [AppDomain]::CurrentDomain.DefineDynamicAssembly($DynAssembly, [Reflection.Emit.AssemblyBuilderAccess]::Run)
$ModuleBuilder = $AssemblyBuilder.DefineDynamicModule('Win32Lib', $False)
$TypeBuilder = $ModuleBuilder.DefineType('sppc', 'Public, Class')
$DllImportConstructor = [Runtime.InteropServices.DllImportAttribute].GetConstructor(@([String]))
$FieldArray = [Reflection.FieldInfo[]] @([Runtime.InteropServices.DllImportAttribute].GetField('EntryPoint'))
$Open = $TypeBuilder.DefineMethod('SLOpen', [Reflection.MethodAttributes] 'Public, Static', [int], @([IntPtr].MakeByRefType()))
$Open.SetCustomAttribute((New-Object Reflection.Emit.CustomAttributeBuilder(
$DllImportConstructor,
@($DllPath),
$FieldArray,
@('SLOpen'))))
$GetSLIDList = $TypeBuilder.DefineMethod('SLGetSLIDList', [Reflection.MethodAttributes] 'Public, Static', [int], @([IntPtr], [int], [guid].MakeByRefType(), [int], [int].MakeByRefType(), [IntPtr].MakeByRefType()))
$GetSLIDList.SetCustomAttribute((New-Object Reflection.Emit.CustomAttributeBuilder(
$DllImportConstructor,
@($DllPath),
$FieldArray,
@('SLGetSLIDList'))))
$UninstallLicense = $TypeBuilder.DefineMethod('SLUninstallLicense', [Reflection.MethodAttributes] 'Public, Static', [int], @([IntPtr], [IntPtr]))
$UninstallLicense.SetCustomAttribute((New-Object Reflection.Emit.CustomAttributeBuilder(
$DllImportConstructor,
@($DllPath),
$FieldArray,
@('SLUninstallLicense'))))
$SPPC = $TypeBuilder.CreateType()
$Handle = [IntPtr]::Zero
$SPPC::SLOpen([ref]$handle) | Out-Null
$pnReturnIds = 0
$ppReturnIds = [IntPtr]::Zero
if (!$SPPC::SLGetSLIDList($handle, 0, [ref][guid]"0ff1ce15-a989-479d-af46-f275c6370663", 6, [ref]$pnReturnIds, [ref]$ppReturnIds)) {
foreach ($i in 0..($pnReturnIds - 1)) {
$SPPC::SLUninstallLicense($handle, [System.Int64]$ppReturnIds + [System.Int64]16 * $i) | Out-Null
}
}
}
$OSPP = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" -ErrorAction SilentlyContinue).Path
if ($OSPP) {
UninstallLicenses($OSPP + "osppc.dll")
}
UninstallLicenses("sppc.dll")
:embed:

BIN
OfficeScrubber/bin/x64/cleanospp.exe

Binary file not shown.

BIN
OfficeScrubber/bin/x64/msvcr100.dll

Binary file not shown.

BIN
OfficeScrubber/bin/x86/cleanospp.exe

Binary file not shown.

BIN
OfficeScrubber/bin/x86/msvcr100.dll

Binary file not shown.

168
W10MUI/Updates/W10UI.cmd

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
@setlocal DisableDelayedExpansion
@set uiv=v10.27
@set uiv=v10.30
@echo off
:: enable debug mode, you must also set target and repo (if updates are not beside the script)
set _Debug=0
@ -36,7 +36,7 @@ set WinRE=1 @@ -36,7 +36,7 @@ set WinRE=1
:: Force updating winre.wim with Cumulative Update regardless if SafeOS update detected
set LCUwinre=0
:: update ISO boot files bootmgr/bootmgr.efi/efisys.bin from Cumulative Update
:: update ISO boot files bootmgr/memtest/efisys.bin from Cumulative Update
set UpdtBootFiles=0
:: 1 = do not install EdgeChromium with Enablement Package or Cumulative Update
@ -195,6 +195,10 @@ set psfcpp=0 @@ -195,6 +195,10 @@ set psfcpp=0
if exist "PSFExtractor.exe" set psfcpp=1&set _exe="!_work!\PSFExtractor.exe"
if exist "bin\PSFExtractor.exe" set psfcpp=1&set _exe="!_work!\bin\PSFExtractor.exe"
if not defined _sdr set psfcpp=0
set stcexp=0
set _exp=expand.exe
if exist "bin\expand.exe" if exist "bin\dpx.dll" (set stcexp=1&set _exp="!_work!\bin\expand.exe")
if exist "expand.exe" if exist "dpx.dll" (set stcexp=1&set _exp="!_work!\expand.exe")
if not exist "W10UI.ini" goto :proceed
find /i "[W10UI-Configuration]" W10UI.ini %_Nul1% || goto :proceed
setlocal DisableDelayedExpansion
@ -611,6 +615,7 @@ goto :eof @@ -611,6 +615,7 @@ goto :eof
if /i %arch%==x86 (set efifile=bootia32.efi&set sss=x86) else if /i %arch%==x64 (set efifile=bootx64.efi&set sss=amd64) else (set efifile=bootaa64.efi&set sss=arm64)
if %_embd% equ 0 call :cleaner
if not exist "!_cabdir!\" mkdir "!_cabdir!"
if %online%==0 if %stcexp%==0 if %_build% geq 22000 if exist "%SysPath%\ucrtbase.dll" call :get_dpx
call :detector
if %_cab% neq 0 (
set msuchk=0&set count=0
@ -707,7 +712,7 @@ if exist "!repo!\%kbcab%" goto :eof @@ -707,7 +712,7 @@ if exist "!repo!\%kbcab%" goto :eof
if not exist "!repo!\%kbcab%" findstr /i /m "%kbcab%" cabmsu.txt %_Nul3% || echo %kbcab%>>cabmsu.txt
)
echo %count%/%_msu%: %package%
expand.exe -f:*Windows*.cab "!repo!\!package!" "!repo!" %_Null%
%_exp% -f:*Windows*.cab "!repo!\!package!" "!repo!" %_Null%
goto :eof
:msu1
@ -716,8 +721,8 @@ if %_embd% equ 0 if exist "%dest%\" rmdir /s /q "%dest%\" %_Nul3% @@ -716,8 +721,8 @@ if %_embd% equ 0 if exist "%dest%\" rmdir /s /q "%dest%\" %_Nul3%
if not exist "%dest%\chck\" mkdir "%dest%\chck"
echo %count%/%_msu%: %package% [Combined UUP]
if %msuwim% equ 0 (
expand.exe -f:*Windows*.cab "!repo!\!package!" "%dest%\chck" %_Null%
expand.exe -f:SSU-*%arch%*.cab "!repo!\!package!" "%dest%\chck" %_Null%
%_exp% -f:*Windows*.cab "!repo!\!package!" "%dest%\chck" %_Null%
%_exp% -f:SSU-*%arch%*.cab "!repo!\!package!" "%dest%\chck" %_Null%
) else (
for /f "tokens=1 delims=\" %%# in ('dism.exe /English /List-Image /ImageFile:"!repo!\!package!" /Index:1 ^| findstr /i /r "SSU-.* %arch%\.wim"') do powershell -nop -c "$f=[IO.File]::ReadAllText('!_batp!') -split ':wimmsu\:.*';iex ($f[1]);E '!repo!\!package!' '%%#' '%dest%\chck\%%#'"
)
@ -725,8 +730,8 @@ for /f "tokens=1 delims=\" %%# in ('dism.exe /English /List-Image /ImageFile:"!r @@ -725,8 +730,8 @@ for /f "tokens=1 delims=\" %%# in ('dism.exe /English /List-Image /ImageFile:"!r
:: del /f /q "%dest%\chck\*.psf" %_Nul3%
for /f "tokens=* delims=" %%# in ('dir /b /on "%dest%\chck\*Windows1*-KB*.*"') do set "compkg=%%#
if %msuwim% equ 0 (
expand.exe -f:update.mum "%dest%\chck\%compkg%" "%dest%" %_Null%
expand.exe -f:%sss%_microsoft-updatetargeting-*os_*.manifest "%dest%\chck\%compkg%" "%dest%" %_Null%
%_exp% -f:update.mum "%dest%\chck\%compkg%" "%dest%" %_Null%
%_exp% -f:%sss%_microsoft-updatetargeting-*os_*.manifest "%dest%\chck\%compkg%" "%dest%" %_Null%
) else (
for /f "tokens=1 delims=\" %%# in ('dism.exe /English /List-Image /ImageFile:"%dest%\chck\%compkg%" /Index:1 ^| findstr /i /r "update.mum %sss%_microsoft-updatetargeting-.*os_"') do powershell -nop -c "$f=[IO.File]::ReadAllText('!_batp!') -split ':wimmsu\:.*';iex ($f[1]);E '%dest%\chck\%compkg%' '%%#' '%dest%\%%#'"
)
@ -747,12 +752,12 @@ if %_embd% equ 0 if exist "%dest%\" rmdir /s /q "%dest%\" %_Nul3% @@ -747,12 +752,12 @@ if %_embd% equ 0 if exist "%dest%\" rmdir /s /q "%dest%\" %_Nul3%
if not exist "%dest%\" mkdir "%dest%"
set /a count+=1
mkdir "checker"
expand.exe -f:update.mum "!repo!\!package!" "checker" %_Null%
%_exp% -f:update.mum "!repo!\!package!" "checker" %_Null%
if not exist "checker\update.mum" (
expand.exe -f:*defender*.xml "!repo!\!package!" "checker" %_Null%
%_exp% -f:*defender*.xml "!repo!\!package!" "checker" %_Null%
if exist "checker\*defender*.xml" (
echo %count%/%_sum%: %package%
expand.exe -f:* "!repo!\!package!" "%dest%" %_Null%
%_exp% -f:* "!repo!\!package!" "%dest%" %_Null%
) else (
echo %count%/%_sum%: %package% [Setup DU]
set isoupdate=!isoupdate! !package!
@ -761,7 +766,7 @@ rmdir /s /q "checker\" %_Nul3% @@ -761,7 +766,7 @@ rmdir /s /q "checker\" %_Nul3%
goto :eof
)
for /f "tokens=2 delims=-" %%V in ('echo %pkgn%') do set pkgid=%%V
expand.exe -f:*.psf.cix.xml "!repo!\!package!" "checker" %_Null%
%_exp% -f:*.psf.cix.xml "!repo!\!package!" "checker" %_Null%
if exist "checker\*.psf.cix.xml" (
if not exist "!repo!\%pkgn%.psf" if not exist "!repo!\*%pkgid%*%arch%*.psf" (
echo %count%/%_sum%: %package% / PSF file is missing
@ -781,10 +786,10 @@ copy /y "checker\update.mum" %SystemRoot%\temp\ %_Nul1% @@ -781,10 +786,10 @@ copy /y "checker\update.mum" %SystemRoot%\temp\ %_Nul1%
if %_build% geq 22621 copy /y "checker\update.mum" "!_cabdir!\LCU.mum" %_Nul1%
call :datemum isodate isotime
)
expand.exe -f:toc.xml "!repo!\!package!" "checker" %_Null%
%_exp% -f:toc.xml "!repo!\!package!" "checker" %_Null%
if exist "checker\toc.xml" (
echo %count%/%_sum%: %package% [Combined]
expand.exe -f:* "!repo!\!package!" "%dest%" %_Null%
%_exp% -f:* "!repo!\!package!" "%dest%" %_Null%
if exist "%dest%\SSU-*%arch%*.cab" for /f "tokens=* delims=" %%# in ('dir /b /on "%dest%\SSU-*%arch%*.cab"') do (set "compkg=%%#"&call :inrenssu)
if exist "%dest%\Windows1*-KB*.cab" for /f "tokens=* delims=" %%# in ('dir /b /on "%dest%\Windows1*-KB*.cab"') do (set "compkg=%%#"&call :inrenupd)
rmdir /s /q "%dest%\" %_Nul3%
@ -799,15 +804,15 @@ if errorlevel 1 (set "_type=[WinPE]"&set _extsafe=1) @@ -799,15 +804,15 @@ if errorlevel 1 (set "_type=[WinPE]"&set _extsafe=1)
)
if not defined _type set _extsafe=1
if %_extsafe%==1 (
expand.exe -f:*_microsoft-windows-sysreset_*.manifest "!repo!\!package!" "checker" %_Null%
%_exp% -f:*_microsoft-windows-sysreset_*.manifest "!repo!\!package!" "checker" %_Null%
if exist "checker\*_microsoft-windows-sysreset_*.manifest" findstr /i /m "Package_for_RollupFix" "checker\update.mum" %_Nul3% || set "_type=[SafeOS DU]"
)
if %_extsafe%==1 if not exist "checker\*_microsoft-windows-sysreset_*.manifest" (
expand.exe -f:*_microsoft-windows-winre-tools_*.manifest "!repo!\!package!" "checker" %_Null%
%_exp% -f:*_microsoft-windows-winre-tools_*.manifest "!repo!\!package!" "checker" %_Null%
if exist "checker\*_microsoft-windows-winre-tools_*.manifest" findstr /i /m "Package_for_RollupFix" "checker\update.mum" %_Nul3% || set "_type=[SafeOS DU]"
)
if %_extsafe%==1 if not exist "checker\*_microsoft-windows-sysreset_*.manifest" (
expand.exe -f:*_microsoft-windows-i..dsetup-rejuvenation_*.manifest "!repo!\!package!" "checker" %_Null%
%_exp% -f:*_microsoft-windows-i..dsetup-rejuvenation_*.manifest "!repo!\!package!" "checker" %_Null%
if exist "checker\*_microsoft-windows-i..dsetup-rejuvenation_*.manifest" findstr /i /m "Package_for_RollupFix" "checker\update.mum" %_Nul3% || set "_type=[SafeOS DU]"
)
if not defined _type (
@ -817,20 +822,20 @@ if not defined _type ( @@ -817,20 +822,20 @@ if not defined _type (
findstr /i /m "Package_for_WindowsExperienceFeaturePack" "checker\update.mum" %_Nul3% && set "_type=[UX FeaturePack]"
)
if not defined _type (
expand.exe -f:*_microsoft-windows-servicingstack_*.manifest "!repo!\!package!" "checker" %_Null%
%_exp% -f:*_microsoft-windows-servicingstack_*.manifest "!repo!\!package!" "checker" %_Null%
if exist "checker\*_microsoft-windows-servicingstack_*.manifest" set "_type=[SSU]"
)
if not defined _type (
expand.exe -f:*_netfx4*.manifest "!repo!\!package!" "checker" %_Null%
%_exp% -f:*_netfx4*.manifest "!repo!\!package!" "checker" %_Null%
if exist "checker\*_netfx4*.manifest" findstr /i /m "Package_for_RollupFix" "checker\update.mum" %_Nul3% || set "_type=[NetFx]"
)
if not defined _type (
expand.exe -f:*_microsoft-windows-s..boot-firmwareupdate_*.manifest "!repo!\!package!" "checker" %_Null%
%_exp% -f:*_microsoft-windows-s..boot-firmwareupdate_*.manifest "!repo!\!package!" "checker" %_Null%
if exist "checker\*_microsoft-windows-s..boot-firmwareupdate_*.manifest" findstr /i /m "Package_for_RollupFix" "checker\update.mum" %_Nul3% || set "_type=[SecureBoot]"
)
set /a _fixSV=%_build%+1
if not defined _type if %_build% geq 18362 (
expand.exe -f:microsoft-windows-*enablement-package~*.mum "!repo!\!package!" "checker" %_Null%
%_exp% -f:microsoft-windows-*enablement-package~*.mum "!repo!\!package!" "checker" %_Null%
if exist "checker\microsoft-windows-*enablement-package~*.mum" set "_type=[Enablement]"
if exist "checker\Microsoft-Windows-1909Enablement-Package~*.mum" set "_fixEP=18363"
if exist "checker\Microsoft-Windows-20H2Enablement-Package~*.mum" set "_fixEP=19042"
@ -847,24 +852,27 @@ if exist "checker\Microsoft-Windows-SV*Enablement-Package~*.mum" for /f "tokens= @@ -847,24 +852,27 @@ if exist "checker\Microsoft-Windows-SV*Enablement-Package~*.mum" for /f "tokens=
)
)
)
if exist "checker\Microsoft-Windows-SV2Moment4Enablement-Package~*.mum" set "_fixEP=22631"
if exist "checker\Microsoft-Windows-SV2Moment5Enablement-Package~*.mum" set "_fixEP=22632"
if exist "checker\Microsoft-Windows-SV2Moment6Enablement-Package~*.mum" set "_fixEP=22633"
if %_build% geq 18362 if exist "checker\*enablement-package*.mum" (
expand.exe -f:*_microsoft-windows-e..-firsttimeinstaller_*.manifest "!repo!\!package!" "checker" %_Null%
%_exp% -f:*_microsoft-windows-e..-firsttimeinstaller_*.manifest "!repo!\!package!" "checker" %_Null%
if exist "checker\*_microsoft-windows-e..-firsttimeinstaller_*.manifest" set "_type=[Enablement / EdgeChromium]"
)
if not defined _type (
expand.exe -f:*_microsoft-windows-e..-firsttimeinstaller_*.manifest "!repo!\!package!" "checker" %_Null%
%_exp% -f:*_microsoft-windows-e..-firsttimeinstaller_*.manifest "!repo!\!package!" "checker" %_Null%
if exist "checker\*_microsoft-windows-e..-firsttimeinstaller_*.manifest" set "_type=[EdgeChromium]"
)
if not defined _type (
expand.exe -f:*_adobe-flash-for-windows_*.manifest "!repo!\!package!" "checker" %_Null%
%_exp% -f:*_adobe-flash-for-windows_*.manifest "!repo!\!package!" "checker" %_Null%
if exist "checker\*_adobe-flash-for-windows_*.manifest" findstr /i /m "Package_for_RollupFix" "checker\update.mum" %_Nul3% || set "_type=[Flash]"
)
echo %count%/%_sum%: %package% %_type%
if not exist "%dest%\update.mum" expand.exe -f:* "!repo!\!package!" "%dest%" %_Null% || (
if not exist "%dest%\update.mum" %_exp% -f:* "!repo!\!package!" "%dest%" %_Null% || (
rmdir /s /q "%dest%\" %_Nul3%
set directcab=!directcab! !package!
)
if exist "%dest%\*cablist.ini" expand.exe -f:* "%dest%\*.cab" "%dest%" %_Null% || (
if exist "%dest%\*cablist.ini" %_exp% -f:* "%dest%\*.cab" "%dest%" %_Null% || (
rmdir /s /q "%dest%\" %_Nul3%
set directcab=!directcab! !package!
)
@ -902,7 +910,7 @@ goto :eof @@ -902,7 +910,7 @@ goto :eof
:uupssu
if exist "!repo!\%compkg:~0,-4%*.cab" goto :eof
set kbupd=
expand.exe -f:update.mum "%dest%\chck\%compkg%" "%dest%\chck" %_Null%
%_exp% -f:update.mum "%dest%\chck\%compkg%" "%dest%\chck" %_Null%
if not exist "%dest%\chck\update.mum" goto :eof
for /f "tokens=3 delims== " %%# in ('findstr /i releaseType "%dest%\chck\update.mum"') do set kbupd=%%~#
if "%kbupd%"=="" goto :eof
@ -936,7 +944,7 @@ goto :eof @@ -936,7 +944,7 @@ goto :eof
:inrenssu
if exist "!repo!\%compkg:~0,-4%*.cab" goto :eof
set kbupd=
expand.exe -f:update.mum "%dest%\%compkg%" "%dest%" %_Null%
%_exp% -f:update.mum "%dest%\%compkg%" "%dest%" %_Null%
if not exist "%dest%\update.mum" goto :eof
for /f "tokens=3 delims== " %%# in ('findstr /i releaseType "%dest%\update.mum"') do set kbupd=%%~#
if "%kbupd%"=="" goto :eof
@ -1218,9 +1226,9 @@ if exist "%lcudir%\update.mum" if exist "%lcudir%\*.manifest" goto :eof @@ -1218,9 +1226,9 @@ if exist "%lcudir%\update.mum" if exist "%lcudir%\*.manifest" goto :eof
rem echo.
rem echo 1/1: %lcupkg% [LCU]
if not exist "%lcudir%\" mkdir "%lcudir%"
expand.exe -f:* "!repo!\%lcupkg%" "%lcudir%" %_Null%
%_exp% -f:* "!repo!\%lcupkg%" "%lcudir%" %_Null%
if exist "%lcudir%\*cablist.ini" (
expand.exe -f:* "%lcudir%\*.cab" "%lcudir%" %_Null%
%_exp% -f:* "%lcudir%\*.cab" "%lcudir%" %_Null%
del /f /q "%lcudir%\*cablist.ini" %_Nul3%
del /f /q "%lcudir%\*.cab" %_Nul3%
)
@ -1303,6 +1311,7 @@ findstr /i /m "Package_for_WindowsExperienceFeaturePack" "%dest%\update.mum" %_N @@ -1303,6 +1311,7 @@ findstr /i /m "Package_for_WindowsExperienceFeaturePack" "%dest%\update.mum" %_N
)
set "wnt=31bf3856ad364e35_10"
if exist "%dest%\%sss%_microsoft-updatetargeting-*os_31bf3856ad364e35_11.*.manifest" set "wnt=31bf3856ad364e35_11"
if exist "%dest%\%sss%_microsoft-updatetargeting-*os_31bf3856ad364e35_12.*.manifest" set "wnt=31bf3856ad364e35_12"
if exist "%dest%\%sss%_microsoft-updatetargeting-*os_%wnt%.%_fixEP%*.manifest" if not defined uupmaj (
for /f "tokens=5-7 delims=_." %%I in ('dir /b /a:-d /on "%dest%\%sss%_microsoft-updatetargeting-*os_%wnt%.%_fixEP%*.manifest"') do (set uupver=%%I.%%K&set uupmaj=%%I&set uupmin=%%K)
if %_fixEP% equ 0 for /f "tokens=5-7 delims=_." %%I in ('dir /b /a:-d /on "%dest%\%sss%_microsoft-updatetargeting-*os_%wnt%.%_fixEP%*.manifest"') do (set uupver=%%J.%%K&set uupmaj=%%J&set uupmin=%%K)
@ -1447,8 +1456,8 @@ for %%# in (inver_aa inver_bl inver_mj inver_mn kbver_aa kbver_bl kbver_mj kbver @@ -1447,8 +1456,8 @@ for %%# in (inver_aa inver_bl inver_mj inver_mn kbver_aa kbver_bl kbver_mj kbver
for /f %%I in ('dir /b /od "!mumcheck!"') do set _pkg=%%~nI
for /f "tokens=4-7 delims=~." %%H in ('echo %_pkg%') do set "inver_aa=%%H"&set "inver_bl=%%I"&set "inver_mj=%%J"&set "inver_mn=%%K"
mkdir "!_cabdir!\check"
if /i "%package:~-4%"==".msu" (expand.exe -f:*Windows*.cab "!repo!\!package!" "!_cabdir!\check" %_Nul3%) else (copy /y "!repo!\!package!" "!_cabdir!\check" %_Nul3%)
expand.exe -f:update.mum "!_cabdir!\check\*.cab" "!_cabdir!\check" %_Null%
if /i "%package:~-4%"==".msu" (%_exp% -f:*Windows*.cab "!repo!\!package!" "!_cabdir!\check" %_Nul3%) else (copy /y "!repo!\!package!" "!_cabdir!\check" %_Nul3%)
%_exp% -f:update.mum "!_cabdir!\check\*.cab" "!_cabdir!\check" %_Null%
if not exist "!_cabdir!\check\*.mum" (set skip=1&rmdir /s /q "!_cabdir!\check\"&goto :eof)
:: self note: do not add " at the end
for /f "tokens=5-8 delims==. " %%H in ('findstr /i %1 "!_cabdir!\check\update.mum"') do set "kbver_aa=%%~H"&set "kbver_bl=%%I"&set "kbver_mj=%%J"&set "kbver_mn=%%K
@ -1779,7 +1788,7 @@ goto :eof @@ -1779,7 +1788,7 @@ goto :eof
:tmprenssu
set kbssu=
mkdir "!_cabdir!\check"
if /i "%ssupkg:~-4%"==".msu" (expand.exe -f:*.txt "%ssupkg%" "!_cabdir!\check" %_Null%) else (expand.exe -f:update.mum "%ssupkg%" "!_cabdir!\check" %_Null%)
if /i "%ssupkg:~-4%"==".msu" (%_exp% -f:*.txt "%ssupkg%" "!_cabdir!\check" %_Null%) else (%_exp% -f:update.mum "%ssupkg%" "!_cabdir!\check" %_Null%)
if not exist "!_cabdir!\check\*.txt" if not exist "!_cabdir!\check\*.mum" (rmdir /s /q "!_cabdir!\check\"&goto :eof)
if exist "!_cabdir!\check\*.txt" (
for /f "tokens=2 delims==" %%# in ('findstr /i /c:"KB Article" "!_cabdir!\check\*.txt"') do set kbssu=KB%%~#
@ -1791,7 +1800,7 @@ if "%kbssu%"=="" (rmdir /s /q "!_cabdir!\check\"&goto :eof) @@ -1791,7 +1800,7 @@ if "%kbssu%"=="" (rmdir /s /q "!_cabdir!\check\"&goto :eof)
set _sfn=Windows10.0-%kbssu%-%arch%.cab
if %_build% geq 22563 set _sfn=Windows11.0-%kbssu%-%arch%.cab
if /i "%ssupkg:~-4%"==".msu" (
expand.exe -f:*%arch%*.cab "%ssupkg%" "!_cabdir!\check" %_Null%
%_exp% -f:*%arch%*.cab "%ssupkg%" "!_cabdir!\check" %_Null%
for /f %%# in ('dir /b "!_cabdir!\check\*.cab"') do copy /y "!_cabdir!\check\%%#" %_sfn% %_Nul3%
) else (
copy /y %ssupkg% %_sfn% %_Nul3%
@ -1945,8 +1954,12 @@ if exist "!mountdir!\Windows\Servicing\Packages\Microsoft-Windows-SV*Enablement- @@ -1945,8 +1954,12 @@ if exist "!mountdir!\Windows\Servicing\Packages\Microsoft-Windows-SV*Enablement-
set /a _fixEP=%_build%+%%i
)
)
if exist "!mountdir!\Windows\Servicing\Packages\Microsoft-Windows-SV2Moment4Enablement-Package~*.mum" set "_fixEP=22631"
if exist "!mountdir!\Windows\Servicing\Packages\Microsoft-Windows-SV2Moment5Enablement-Package~*.mum" set "_fixEP=22632"
if exist "!mountdir!\Windows\Servicing\Packages\Microsoft-Windows-SV2Moment6Enablement-Package~*.mum" set "_fixEP=22633"
set "wnt=31bf3856ad364e35_10"
if exist "!mountdir!\Windows\WinSxS\Manifests\%sss%_microsoft-updatetargeting-*os_31bf3856ad364e35_11.*.manifest" set "wnt=31bf3856ad364e35_11"
if exist "!mountdir!\Windows\WinSxS\Manifests\%sss%_microsoft-updatetargeting-*os_31bf3856ad364e35_12.*.manifest" set "wnt=31bf3856ad364e35_12"
if exist "!mountdir!\Windows\WinSxS\Manifests\%sss%_microsoft-updatetargeting-*os_%wnt%.%_fixEP%*.manifest" (
for /f "tokens=5-7 delims=_." %%I in ('dir /b /a:-d /od "!mountdir!\Windows\WinSxS\Manifests\%sss%_microsoft-updatetargeting-*os_%wnt%.%_fixEP%*.manifest"') do (set uupver=%%I.%%K&set uupmaj=%%I&set uupmin=%%K)
if %_fixEP% equ 0 for /f "tokens=5-7 delims=_." %%I in ('dir /b /a:-d /od "!mountdir!\Windows\WinSxS\Manifests\%sss%_microsoft-updatetargeting-*os_%wnt%.%_fixEP%*.manifest"') do (set uupver=%%J.%%K&set uupmaj=%%J&set uupmin=%%K)
@ -1995,9 +2008,10 @@ copy /y "!mountdir!\Windows\Boot\PCAT\bootmgr" "!target!\" %_Nul1% @@ -1995,9 +2008,10 @@ copy /y "!mountdir!\Windows\Boot\PCAT\bootmgr" "!target!\" %_Nul1%
copy /y "!mountdir!\Windows\Boot\EFI\memtest.efi" "!target!\efi\microsoft\boot\" %_Nul1%
copy /y "!mountdir!\Windows\Boot\PCAT\memtest.exe" "!target!\boot\" %_Nul1%
)
)
if exist "!target!\efi\boot\bootmgfw.efi" copy /y "!mountdir!\Windows\Boot\EFI\bootmgfw.efi" "!target!\efi\boot\bootmgfw.efi" %_Nul1%
copy /y "!mountdir!\Windows\Boot\EFI\bootmgfw.efi" "!target!\efi\boot\%efifile%" %_Nul1%
copy /y "!mountdir!\Windows\Boot\EFI\bootmgr.efi" "!target!\" %_Nul1%
)
if exist "!target!\setup.exe" copy /y "!mountdir!\setup.exe" "!target!\" %_Nul3%
if defined isoupdate if not exist "!mountdir!\Windows\Servicing\Packages\WinPE-Setup-Package~*.mum" (
set uupboot=1
@ -2077,6 +2091,10 @@ if %online%==1 ( @@ -2077,6 +2091,10 @@ if %online%==1 (
)
call :cleanmanual&goto :eof
)
set "_Nul8="
if %_build% geq 25380 (
set "_Nul8=1>nul 2>nul"
)
if %online%==0 (
set ksub=SOFTWIM
reg.exe load HKLM\!ksub! "!mumtarget!\Windows\System32\Config\SOFTWARE" %_Nul1%
@ -2097,7 +2115,7 @@ if /i %xOS%==x86 if /i not %arch%==x86 reg.exe save HKLM\%ksub% "!mumtarget!\Win @@ -2097,7 +2115,7 @@ if /i %xOS%==x86 if /i not %arch%==x86 reg.exe save HKLM\%ksub% "!mumtarget!\Win
reg.exe unload HKLM\!ksub! %_Nul1%
if /i %xOS%==x86 if /i not %arch%==x86 move /y "!mumtarget!\Windows\System32\Config\SOFTWARE2" "!mumtarget!\Windows\System32\Config\SOFTWARE" %_Nul1%
)
%_dism2%:"!_cabdir!" %dismtarget% /Cleanup-Image /StartComponentCleanup
%_dism2%:"!_cabdir!" %dismtarget% /Cleanup-Image /StartComponentCleanup %_Nul8%
if !errorlevel! equ 1726 %_dism2%:"!_cabdir!" %dismtarget% /Get-Packages %_Nul1%
) else (
echo.
@ -2113,9 +2131,9 @@ if /i %xOS%==x86 if /i not %arch%==x86 reg.exe save HKLM\%ksub% "!mumtarget!\Win @@ -2113,9 +2131,9 @@ if /i %xOS%==x86 if /i not %arch%==x86 reg.exe save HKLM\%ksub% "!mumtarget!\Win
reg.exe unload HKLM\!ksub! %_Nul1%
if /i %xOS%==x86 if /i not %arch%==x86 move /y "!mumtarget!\Windows\System32\Config\SOFTWARE2" "!mumtarget!\Windows\System32\Config\SOFTWARE" %_Nul1%
)
if %online%==0 if %_build% geq 16299 %_dism2%:"!_cabdir!" %dismtarget% /Cleanup-Image /StartComponentCleanup
if %online%==0 if %_build% geq 16299 %_dism2%:"!_cabdir!" %dismtarget% /Cleanup-Image /StartComponentCleanup %_Nul8%
if !errorlevel! equ 1726 %_dism2%:"!_cabdir!" %dismtarget% /Get-Packages %_Nul1%
%_dism2%:"!_cabdir!" %dismtarget% /Cleanup-Image /StartComponentCleanup /ResetBase
%_dism2%:"!_cabdir!" %dismtarget% /Cleanup-Image /StartComponentCleanup /ResetBase %_Nul8%
if !errorlevel! equ 1726 %_dism2%:"!_cabdir!" %dismtarget% /Get-Packages %_Nul1%
)
call :cleanmanual
@ -2193,6 +2211,82 @@ reg.exe add "HKLM\TEMP\ControlSet001\Control\Session Manager\Memory Management" @@ -2193,6 +2211,82 @@ reg.exe add "HKLM\TEMP\ControlSet001\Control\Session Manager\Memory Management"
reg.exe unload HKLM\TEMP %_Nul1%
goto :eof
:get_dpx
if %_embd% equ 0 (
echo ============================================================
echo Extracting dpx.dll file...
echo ============================================================
echo.
)
set _nat=0
set _wow=0
if /i %arch%==%xOS% set _nat=1
if /i %arch%==x64 if /i %xOS%==amd64 set _nat=1
if %_nat% equ 0 set _wow=1
if %_wow% equ 1 if exist "!repo!\DesktopDeployment_x86.cab" (
for /f "tokens=* delims=" %%# in ('dir /b /on "!repo!\DesktopDeployment_x86.cab"') do expand.exe -f:dpx.dll "!repo!\%%#" "!_cabdir!" %_Nul3%
if exist "!_cabdir!\dpx.dll" (
copy /y %SystemRoot%\SysWOW64\expand.exe "!_cabdir!\" %_Nul3%
set _exp="!_cabdir!\expand.exe"
exit /b
)
)
if %_nat% equ 1 if exist "!repo!\*DesktopDeployment.cab" (
for /f "tokens=* delims=" %%# in ('dir /b /on "!repo!\*DesktopDeployment.cab"') do expand.exe -f:dpx.dll "!repo!\%%#" "!_cabdir!" %_Nul3%
if exist "!_cabdir!\dpx.dll" (
copy /y %SysPath%\expand.exe "!_cabdir!\" %_Nul3%
set _exp="!_cabdir!\expand.exe"
exit /b
)
)
set msuwim=0
set "uupmsu="
if exist "!repo!\*Windows1*-KB*%arch%*.msu" for /f "tokens=* delims=" %%# in ('dir /b /on "!repo!\*Windows1*-KB*%arch%*.msu"') do (
expand.exe -d -f:*Windows*.psf "!repo!\%%#" %_Nul2% | findstr /i %arch%\.psf %_Nul3% && (set "uupmsu=%%#")
dism.exe /English /List-Image /ImageFile:"!repo!\%%#" /Index:1 %_Nul2% | findstr /i %arch%\.psf %_Nul3% && (set "uupmsu=%%#"&set msuwim=1)
)
if %msuwim% equ 1 if %_pwsh% equ 0 exit /b
if defined uupmsu if %msuwim% equ 0 (
if %_wow% equ 1 expand.exe -f:DesktopDeployment_x86.cab "!repo!\%uupmsu%" "!_cabdir!" %_Nul3%
if %_nat% equ 1 expand.exe -f:DesktopDeployment.cab "!repo!\%uupmsu%" "!_cabdir!" %_Nul3%
)
if defined uupmsu if %msuwim% equ 1 (
if %_wow% equ 1 powershell -nop -c "$f=[IO.File]::ReadAllText('!_batp!') -split ':wimmsu\:.*';iex ($f[1]);E '!repo!\%uupmsu%' 'DesktopDeployment_x86.cab' '!_cabdir!\DesktopDeployment_x86.cab'"
if %_nat% equ 1 powershell -nop -c "$f=[IO.File]::ReadAllText('!_batp!') -split ':wimmsu\:.*';iex ($f[1]);E '!repo!\%uupmsu%' 'DesktopDeployment.cab' '!_cabdir!\DesktopDeployment.cab'"
)
set dpxwim=install.wim
if %wim%==1 set "dpxwim=!target!"
if %dvd%==1 set "dpxwim=!target!\sources\install.wim"
if %_wow% equ 1 (
if exist "!_cabdir!\DesktopDeployment_x86.cab" (
expand.exe -f:dpx.dll "!_cabdir!\DesktopDeployment_x86.cab" "!_cabdir!" %_Nul3%
) else (
if %offline%==1 copy /y "!mountdir!\Windows\SysWOW64\dpx.dll" "!_cabdir!\" %_Nul3%
if %wimfiles%==1 powershell -nop -c "$f=[IO.File]::ReadAllText('!_batp!') -split ':wimmsu\:.*';iex ($f[1]);E '!dpxwim!' 'Windows\SysWOW64\dpx.dll' '!_cabdir!\dpx.dll'"
)
if exist "!_cabdir!\dpx.dll" (
copy /y %SystemRoot%\SysWOW64\expand.exe "!_cabdir!\" %_Nul3%
set _exp="!_cabdir!\expand.exe"
)
)
if %_nat% equ 1 (
if exist "!_cabdir!\DesktopDeployment.cab" (
expand.exe -f:dpx.dll "!_cabdir!\DesktopDeployment.cab" "!_cabdir!" %_Nul3%
) else (
if %offline%==1 copy /y "!mountdir!\Windows\System32\dpx.dll" "!_cabdir!\" %_Nul3%
if %wimfiles%==1 powershell -nop -c "$f=[IO.File]::ReadAllText('!_batp!') -split ':wimmsu\:.*';iex ($f[1]);E '!dpxwim!' 'Windows\System32\dpx.dll' '!_cabdir!\dpx.dll'"
)
if exist "!_cabdir!\dpx.dll" (
copy /y %SysPath%\expand.exe "!_cabdir!\" %_Nul3%
set _exp="!_cabdir!\expand.exe"
)
)
exit /b
:E_Target
echo.
echo ============================================================

12
W10MUI/W10MUI.cmd

@ -255,6 +255,7 @@ set _ODext86= @@ -255,6 +255,7 @@ set _ODext86=
set _ODtra86=
set _ODnetwork86=
set _ODnickl86=
set _ODzinc86=
set _ODpaint86=
set _ODnote86=
set _ODpower86=
@ -269,6 +270,7 @@ set _ODethernet86= @@ -269,6 +270,7 @@ set _ODethernet86=
set _ODwifi86=
set _ODmedia86=
set _ODwmi86=
set _ODpfs86=
if %_oa% neq 0 for /L %%j in (1,1,%_oa%) do (
"!_7z!" x ".\ondemand\x86\!OAFILE%%j!" -o"!TEMPDIR!\FOD86\OAFILE%%j" * -r %_Null%
pushd "!TEMPDIR!\FOD86\OAFILE%%j"
@ -303,6 +305,9 @@ if %_lpver% geq 22567 ( @@ -303,6 +305,9 @@ if %_lpver% geq 22567 (
findstr /i /m Microsoft-Windows-MediaPlayer update.mum %_Nul3% && (set _ODnickl86=1&call set _ODmedia86=!_ODmedia86! /PackagePath:OAFILE%%j\update.mum)
findstr /i /m Microsoft-Windows-WMIC-FoD update.mum %_Nul3% && (set _ODnickl86=1&call set _ODwmi86=!_ODwmi86! /PackagePath:OAFILE%%j\update.mum)
)
if %_lpver% geq 25346 (
findstr /i /m Microsoft-Windows-ProjFS-OptionalFeature-FoD update.mum %_Nul3% && (set _ODzinc86=1&call set _ODpfs86=!_ODpfs86! /PackagePath:OAFILE%%j\update.mum)
)
popd
)
set _ODbasic64=
@ -316,6 +321,7 @@ set _ODext64= @@ -316,6 +321,7 @@ set _ODext64=
set _ODtra64=
set _ODnetwork64=
set _ODnickl64=
set _ODzinc64=
set _ODpaint64=
set _ODnote64=
set _ODpower64=
@ -330,6 +336,7 @@ set _ODethernet64= @@ -330,6 +336,7 @@ set _ODethernet64=
set _ODwifi64=
set _ODmedia64=
set _ODwmi64=
set _ODpfs64=
if %_ob% neq 0 for /L %%j in (1,1,%_ob%) do (
"!_7z!" x ".\ondemand\x64\!OBFILE%%j!" -o"!TEMPDIR!\FOD64\OBFILE%%j" * -r %_Null%
pushd "!TEMPDIR!\FOD64\OBFILE%%j"
@ -364,6 +371,9 @@ if %_lpver% geq 22567 ( @@ -364,6 +371,9 @@ if %_lpver% geq 22567 (
findstr /i /m Microsoft-Windows-MediaPlayer update.mum %_Nul3% && (set _ODnickl64=1&call set _ODmedia64=!_ODmedia64! /PackagePath:OBFILE%%j\update.mum)
findstr /i /m Microsoft-Windows-WMIC-FoD update.mum %_Nul3% && (set _ODnickl64=1&call set _ODwmi64=!_ODwmi64! /PackagePath:OBFILE%%j\update.mum)
)
if %_lpver% geq 25346 (
findstr /i /m Microsoft-Windows-ProjFS-OptionalFeature-FoD update.mum %_Nul3% && (set _ODzinc64=1&call set _ODpfs64=!_ODpfs64! /PackagePath:OAFILE%%j\update.mum)
)
popd
)
@ -577,6 +587,7 @@ if defined _ODext64 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_ @@ -577,6 +587,7 @@ if defined _ODext64 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_
if defined _ODtra64 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_dLog%\MUIinstallFOD64c.log" /Add-Package !_ODpmcppc64! !_ODpwsf64! !_ODword64! !_ODstep64! !_ODsnip64!
if defined _ODnetwork64 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_dLog%\MUIinstallFOD64d.log" /Add-Package !_ODethernet64! !_ODwifi64!
if defined _ODnickl64 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_dLog%\MUIinstallFOD64e.log" /Add-Package !_ODmedia64! !_ODwmi64!
if defined _ODzinc64 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_dLog%\MUIinstallFOD64f.log" /Add-Package !_ODpfs64!
popd
)
if /i !WIMARCH%%i!==x86 if exist "!TEMPDIR!\FOD86\OAFILE1\update.mum" (
@ -587,6 +598,7 @@ if defined _ODext86 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_ @@ -587,6 +598,7 @@ if defined _ODext86 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_
if defined _ODtra86 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_dLog%\MUIinstallFOD86c.log" /Add-Package !_ODpmcppc86! !_ODpwsf86! !_ODword86! !_ODstep86! !_ODsnip86!
if defined _ODnetwork86 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_dLog%\MUIinstallFOD86d.log" /Add-Package !_ODethernet86! !_ODwifi86!
if defined _ODnickl86 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_dLog%\MUIinstallFOD86e.log" /Add-Package !_ODmedia86! !_ODwmi86!
if defined _ODzinc86 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_dLog%\MUIinstallFOD86f.log" /Add-Package !_ODpfs86!
popd
)
echo.

12
W10MUI/W10MUI_Mini.cmd

@ -246,6 +246,7 @@ set _ODext86= @@ -246,6 +246,7 @@ set _ODext86=
set _ODtra86=
set _ODnetwork86=
set _ODnickl86=
set _ODzinc86=
set _ODpaint86=
set _ODnote86=
set _ODpower86=
@ -260,6 +261,7 @@ set _ODethernet86= @@ -260,6 +261,7 @@ set _ODethernet86=
set _ODwifi86=
set _ODmedia86=
set _ODwmi86=
set _ODpfs86=
if %_oa% neq 0 for /L %%j in (1,1,%_oa%) do (
"!_7z!" x ".\ondemand\x86\!OAFILE%%j!" -o"!TEMPDIR!\FOD86\OAFILE%%j" * -r %_Null%
pushd "!TEMPDIR!\FOD86\OAFILE%%j"
@ -294,6 +296,9 @@ if %_lpver% geq 22567 ( @@ -294,6 +296,9 @@ if %_lpver% geq 22567 (
findstr /i /m Microsoft-Windows-MediaPlayer update.mum %_Nul3% && (set _ODnickl86=1&call set _ODmedia86=!_ODmedia86! /PackagePath:OAFILE%%j\update.mum)
findstr /i /m Microsoft-Windows-WMIC-FoD update.mum %_Nul3% && (set _ODnickl86=1&call set _ODwmi86=!_ODwmi86! /PackagePath:OAFILE%%j\update.mum)
)
if %_lpver% geq 25346 (
findstr /i /m Microsoft-Windows-ProjFS-OptionalFeature-FoD update.mum %_Nul3% && (set _ODzinc86=1&call set _ODpfs86=!_ODpfs86! /PackagePath:OAFILE%%j\update.mum)
)
popd
)
set _ODbasic64=
@ -307,6 +312,7 @@ set _ODext64= @@ -307,6 +312,7 @@ set _ODext64=
set _ODtra64=
set _ODnetwork64=
set _ODnickl64=
set _ODzinc64=
set _ODpaint64=
set _ODnote64=
set _ODpower64=
@ -321,6 +327,7 @@ set _ODethernet64= @@ -321,6 +327,7 @@ set _ODethernet64=
set _ODwifi64=
set _ODmedia64=
set _ODwmi64=
set _ODpfs64=
if %_ob% neq 0 for /L %%j in (1,1,%_ob%) do (
"!_7z!" x ".\ondemand\x64\!OBFILE%%j!" -o"!TEMPDIR!\FOD64\OBFILE%%j" * -r %_Null%
pushd "!TEMPDIR!\FOD64\OBFILE%%j"
@ -355,6 +362,9 @@ if %_lpver% geq 22567 ( @@ -355,6 +362,9 @@ if %_lpver% geq 22567 (
findstr /i /m Microsoft-Windows-MediaPlayer update.mum %_Nul3% && (set _ODnickl64=1&call set _ODmedia64=!_ODmedia64! /PackagePath:OBFILE%%j\update.mum)
findstr /i /m Microsoft-Windows-WMIC-FoD update.mum %_Nul3% && (set _ODnickl64=1&call set _ODwmi64=!_ODwmi64! /PackagePath:OBFILE%%j\update.mum)
)
if %_lpver% geq 25346 (
findstr /i /m Microsoft-Windows-ProjFS-OptionalFeature-FoD update.mum %_Nul3% && (set _ODzinc64=1&call set _ODpfs64=!_ODpfs64! /PackagePath:OAFILE%%j\update.mum)
)
popd
)
dism\imagex.exe /info "!WIMPATH!" | findstr /c:"LZMS" %_Nul1% && goto :E_ESD
@ -533,6 +543,7 @@ if defined _ODext64 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_ @@ -533,6 +543,7 @@ if defined _ODext64 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_
if defined _ODtra64 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_dLog%\MUIinstallFOD64c.log" /Add-Package !_ODpmcppc64! !_ODpwsf64! !_ODword64! !_ODstep64! !_ODsnip64!
if defined _ODnetwork64 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_dLog%\MUIinstallFOD64d.log" /Add-Package !_ODethernet64! !_ODwifi64!
if defined _ODnickl64 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_dLog%\MUIinstallFOD64e.log" /Add-Package !_ODmedia64! !_ODwmi64!
if defined _ODzinc64 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_dLog%\MUIinstallFOD64f.log" /Add-Package !_ODpfs64!
popd
)
if /i !WIMARCH%%i!==x86 if exist "!TEMPDIR!\FOD86\OAFILE1\update.mum" (
@ -543,6 +554,7 @@ if defined _ODext86 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_ @@ -543,6 +554,7 @@ if defined _ODext86 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_
if defined _ODtra86 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_dLog%\MUIinstallFOD86c.log" /Add-Package !_ODpmcppc86! !_ODpwsf86! !_ODword86! !_ODstep86! !_ODsnip86!
if defined _ODnetwork86 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_dLog%\MUIinstallFOD86d.log" /Add-Package !_ODethernet86! !_ODwifi86!
if defined _ODnickl86 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_dLog%\MUIinstallFOD86e.log" /Add-Package !_ODmedia86! !_ODwmi86!
if defined _ODzinc86 !_dism2!:"!TMPDISM!" /Image:"%INSTALLMOUNTDIR%" /LogPath:"%_dLog%\MUIinstallFOD86f.log" /Add-Package !_ODpfs86!
popd
)
echo.

16
W10UI/README.md

@ -189,6 +189,16 @@ wait until command prompt window is closed and W10UI_Debug.log is created @@ -189,6 +189,16 @@ wait until command prompt window is closed and W10UI_Debug.log is created
<details><summary>changelog</summary>
10.30:
- Added workaround for using target image dpx.dll to extract updates cab files for builds 22000+
- Suppress DISM cleanup output for builds 25380+
10.29:
- ISO files bootmgr.efi/bootmgfw.efi will be always updated, regardless UpdtBootFiles option
10.28:
- Added conditional support for SV2 beta builds 22631+
10.27:
- Updated detection for separate Secure Boot updates
@ -391,15 +401,15 @@ https://docs.microsoft.com/en-us/windows/deployment/update/media-dynamic-update @@ -391,15 +401,15 @@ https://docs.microsoft.com/en-us/windows/deployment/update/media-dynamic-update
7:7:
- x64 target on x86 host: Fix for unseen registry flush error.
7:6:
7.6:
- x64 target on x86 host: Fix for wrong detection.
7:5:
7.5:
- Code improvements and fixes.
- Added option wim2esd to convert install.wim to install.esd (only for distribution target)
7:4:
7.4:
- Detect and skip WinPE only updates for install.wim
7.3:

168
W10UI/W10UI.cmd

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
@setlocal DisableDelayedExpansion
@set uiv=v10.27
@set uiv=v10.30
@echo off
:: enable debug mode, you must also set target and repo (if updates are not beside the script)
set _Debug=0
@ -36,7 +36,7 @@ set WinRE=1 @@ -36,7 +36,7 @@ set WinRE=1
:: Force updating winre.wim with Cumulative Update regardless if SafeOS update detected
set LCUwinre=0
:: update ISO boot files bootmgr/bootmgr.efi/efisys.bin from Cumulative Update
:: update ISO boot files bootmgr/memtest/efisys.bin from Cumulative Update
set UpdtBootFiles=0
:: 1 = do not install EdgeChromium with Enablement Package or Cumulative Update
@ -195,6 +195,10 @@ set psfcpp=0 @@ -195,6 +195,10 @@ set psfcpp=0
if exist "PSFExtractor.exe" set psfcpp=1&set _exe="!_work!\PSFExtractor.exe"
if exist "bin\PSFExtractor.exe" set psfcpp=1&set _exe="!_work!\bin\PSFExtractor.exe"
if not defined _sdr set psfcpp=0
set stcexp=0
set _exp=expand.exe
if exist "bin\expand.exe" if exist "bin\dpx.dll" (set stcexp=1&set _exp="!_work!\bin\expand.exe")
if exist "expand.exe" if exist "dpx.dll" (set stcexp=1&set _exp="!_work!\expand.exe")
if not exist "W10UI.ini" goto :proceed
find /i "[W10UI-Configuration]" W10UI.ini %_Nul1% || goto :proceed
setlocal DisableDelayedExpansion
@ -611,6 +615,7 @@ goto :eof @@ -611,6 +615,7 @@ goto :eof
if /i %arch%==x86 (set efifile=bootia32.efi&set sss=x86) else if /i %arch%==x64 (set efifile=bootx64.efi&set sss=amd64) else (set efifile=bootaa64.efi&set sss=arm64)
if %_embd% equ 0 call :cleaner
if not exist "!_cabdir!\" mkdir "!_cabdir!"
if %online%==0 if %stcexp%==0 if %_build% geq 22000 if exist "%SysPath%\ucrtbase.dll" call :get_dpx
call :detector
if %_cab% neq 0 (
set msuchk=0&set count=0
@ -707,7 +712,7 @@ if exist "!repo!\%kbcab%" goto :eof @@ -707,7 +712,7 @@ if exist "!repo!\%kbcab%" goto :eof
if not exist "!repo!\%kbcab%" findstr /i /m "%kbcab%" cabmsu.txt %_Nul3% || echo %kbcab%>>cabmsu.txt
)
echo %count%/%_msu%: %package%
expand.exe -f:*Windows*.cab "!repo!\!package!" "!repo!" %_Null%
%_exp% -f:*Windows*.cab "!repo!\!package!" "!repo!" %_Null%
goto :eof
:msu1
@ -716,8 +721,8 @@ if %_embd% equ 0 if exist "%dest%\" rmdir /s /q "%dest%\" %_Nul3% @@ -716,8 +721,8 @@ if %_embd% equ 0 if exist "%dest%\" rmdir /s /q "%dest%\" %_Nul3%
if not exist "%dest%\chck\" mkdir "%dest%\chck"
echo %count%/%_msu%: %package% [Combined UUP]
if %msuwim% equ 0 (
expand.exe -f:*Windows*.cab "!repo!\!package!" "%dest%\chck" %_Null%
expand.exe -f:SSU-*%arch%*.cab "!repo!\!package!" "%dest%\chck" %_Null%
%_exp% -f:*Windows*.cab "!repo!\!package!" "%dest%\chck" %_Null%
%_exp% -f:SSU-*%arch%*.cab "!repo!\!package!" "%dest%\chck" %_Null%
) else (
for /f "tokens=1 delims=\" %%# in ('dism.exe /English /List-Image /ImageFile:"!repo!\!package!" /Index:1 ^| findstr /i /r "SSU-.* %arch%\.wim"') do powershell -nop -c "$f=[IO.File]::ReadAllText('!_batp!') -split ':wimmsu\:.*';iex ($f[1]);E '!repo!\!package!' '%%#' '%dest%\chck\%%#'"
)
@ -725,8 +730,8 @@ for /f "tokens=1 delims=\" %%# in ('dism.exe /English /List-Image /ImageFile:"!r @@ -725,8 +730,8 @@ for /f "tokens=1 delims=\" %%# in ('dism.exe /English /List-Image /ImageFile:"!r
:: del /f /q "%dest%\chck\*.psf" %_Nul3%
for /f "tokens=* delims=" %%# in ('dir /b /on "%dest%\chck\*Windows1*-KB*.*"') do set "compkg=%%#
if %msuwim% equ 0 (
expand.exe -f:update.mum "%dest%\chck\%compkg%" "%dest%" %_Null%
expand.exe -f:%sss%_microsoft-updatetargeting-*os_*.manifest "%dest%\chck\%compkg%" "%dest%" %_Null%
%_exp% -f:update.mum "%dest%\chck\%compkg%" "%dest%" %_Null%
%_exp% -f:%sss%_microsoft-updatetargeting-*os_*.manifest "%dest%\chck\%compkg%" "%dest%" %_Null%
) else (
for /f "tokens=1 delims=\" %%# in ('dism.exe /English /List-Image /ImageFile:"%dest%\chck\%compkg%" /Index:1 ^| findstr /i /r "update.mum %sss%_microsoft-updatetargeting-.*os_"') do powershell -nop -c "$f=[IO.File]::ReadAllText('!_batp!') -split ':wimmsu\:.*';iex ($f[1]);E '%dest%\chck\%compkg%' '%%#' '%dest%\%%#'"
)
@ -747,12 +752,12 @@ if %_embd% equ 0 if exist "%dest%\" rmdir /s /q "%dest%\" %_Nul3% @@ -747,12 +752,12 @@ if %_embd% equ 0 if exist "%dest%\" rmdir /s /q "%dest%\" %_Nul3%
if not exist "%dest%\" mkdir "%dest%"
set /a count+=1
mkdir "checker"
expand.exe -f:update.mum "!repo!\!package!" "checker" %_Null%
%_exp% -f:update.mum "!repo!\!package!" "checker" %_Null%
if not exist "checker\update.mum" (
expand.exe -f:*defender*.xml "!repo!\!package!" "checker" %_Null%
%_exp% -f:*defender*.xml "!repo!\!package!" "checker" %_Null%
if exist "checker\*defender*.xml" (
echo %count%/%_sum%: %package%
expand.exe -f:* "!repo!\!package!" "%dest%" %_Null%
%_exp% -f:* "!repo!\!package!" "%dest%" %_Null%
) else (
echo %count%/%_sum%: %package% [Setup DU]
set isoupdate=!isoupdate! !package!
@ -761,7 +766,7 @@ rmdir /s /q "checker\" %_Nul3% @@ -761,7 +766,7 @@ rmdir /s /q "checker\" %_Nul3%
goto :eof
)
for /f "tokens=2 delims=-" %%V in ('echo %pkgn%') do set pkgid=%%V
expand.exe -f:*.psf.cix.xml "!repo!\!package!" "checker" %_Null%
%_exp% -f:*.psf.cix.xml "!repo!\!package!" "checker" %_Null%
if exist "checker\*.psf.cix.xml" (
if not exist "!repo!\%pkgn%.psf" if not exist "!repo!\*%pkgid%*%arch%*.psf" (
echo %count%/%_sum%: %package% / PSF file is missing
@ -781,10 +786,10 @@ copy /y "checker\update.mum" %SystemRoot%\temp\ %_Nul1% @@ -781,10 +786,10 @@ copy /y "checker\update.mum" %SystemRoot%\temp\ %_Nul1%
if %_build% geq 22621 copy /y "checker\update.mum" "!_cabdir!\LCU.mum" %_Nul1%
call :datemum isodate isotime
)
expand.exe -f:toc.xml "!repo!\!package!" "checker" %_Null%
%_exp% -f:toc.xml "!repo!\!package!" "checker" %_Null%
if exist "checker\toc.xml" (
echo %count%/%_sum%: %package% [Combined]
expand.exe -f:* "!repo!\!package!" "%dest%" %_Null%
%_exp% -f:* "!repo!\!package!" "%dest%" %_Null%
if exist "%dest%\SSU-*%arch%*.cab" for /f "tokens=* delims=" %%# in ('dir /b /on "%dest%\SSU-*%arch%*.cab"') do (set "compkg=%%#"&call :inrenssu)
if exist "%dest%\Windows1*-KB*.cab" for /f "tokens=* delims=" %%# in ('dir /b /on "%dest%\Windows1*-KB*.cab"') do (set "compkg=%%#"&call :inrenupd)
rmdir /s /q "%dest%\" %_Nul3%
@ -799,15 +804,15 @@ if errorlevel 1 (set "_type=[WinPE]"&set _extsafe=1) @@ -799,15 +804,15 @@ if errorlevel 1 (set "_type=[WinPE]"&set _extsafe=1)
)
if not defined _type set _extsafe=1
if %_extsafe%==1 (
expand.exe -f:*_microsoft-windows-sysreset_*.manifest "!repo!\!package!" "checker" %_Null%
%_exp% -f:*_microsoft-windows-sysreset_*.manifest "!repo!\!package!" "checker" %_Null%
if exist "checker\*_microsoft-windows-sysreset_*.manifest" findstr /i /m "Package_for_RollupFix" "checker\update.mum" %_Nul3% || set "_type=[SafeOS DU]"
)
if %_extsafe%==1 if not exist "checker\*_microsoft-windows-sysreset_*.manifest" (
expand.exe -f:*_microsoft-windows-winre-tools_*.manifest "!repo!\!package!" "checker" %_Null%
%_exp% -f:*_microsoft-windows-winre-tools_*.manifest "!repo!\!package!" "checker" %_Null%
if exist "checker\*_microsoft-windows-winre-tools_*.manifest" findstr /i /m "Package_for_RollupFix" "checker\update.mum" %_Nul3% || set "_type=[SafeOS DU]"
)
if %_extsafe%==1 if not exist "checker\*_microsoft-windows-sysreset_*.manifest" (
expand.exe -f:*_microsoft-windows-i..dsetup-rejuvenation_*.manifest "!repo!\!package!" "checker" %_Null%
%_exp% -f:*_microsoft-windows-i..dsetup-rejuvenation_*.manifest "!repo!\!package!" "checker" %_Null%
if exist "checker\*_microsoft-windows-i..dsetup-rejuvenation_*.manifest" findstr /i /m "Package_for_RollupFix" "checker\update.mum" %_Nul3% || set "_type=[SafeOS DU]"
)
if not defined _type (
@ -817,20 +822,20 @@ if not defined _type ( @@ -817,20 +822,20 @@ if not defined _type (
findstr /i /m "Package_for_WindowsExperienceFeaturePack" "checker\update.mum" %_Nul3% && set "_type=[UX FeaturePack]"
)
if not defined _type (
expand.exe -f:*_microsoft-windows-servicingstack_*.manifest "!repo!\!package!" "checker" %_Null%
%_exp% -f:*_microsoft-windows-servicingstack_*.manifest "!repo!\!package!" "checker" %_Null%
if exist "checker\*_microsoft-windows-servicingstack_*.manifest" set "_type=[SSU]"
)
if not defined _type (
expand.exe -f:*_netfx4*.manifest "!repo!\!package!" "checker" %_Null%
%_exp% -f:*_netfx4*.manifest "!repo!\!package!" "checker" %_Null%
if exist "checker\*_netfx4*.manifest" findstr /i /m "Package_for_RollupFix" "checker\update.mum" %_Nul3% || set "_type=[NetFx]"
)
if not defined _type (
expand.exe -f:*_microsoft-windows-s..boot-firmwareupdate_*.manifest "!repo!\!package!" "checker" %_Null%
%_exp% -f:*_microsoft-windows-s..boot-firmwareupdate_*.manifest "!repo!\!package!" "checker" %_Null%
if exist "checker\*_microsoft-windows-s..boot-firmwareupdate_*.manifest" findstr /i /m "Package_for_RollupFix" "checker\update.mum" %_Nul3% || set "_type=[SecureBoot]"
)
set /a _fixSV=%_build%+1
if not defined _type if %_build% geq 18362 (
expand.exe -f:microsoft-windows-*enablement-package~*.mum "!repo!\!package!" "checker" %_Null%
%_exp% -f:microsoft-windows-*enablement-package~*.mum "!repo!\!package!" "checker" %_Null%
if exist "checker\microsoft-windows-*enablement-package~*.mum" set "_type=[Enablement]"
if exist "checker\Microsoft-Windows-1909Enablement-Package~*.mum" set "_fixEP=18363"
if exist "checker\Microsoft-Windows-20H2Enablement-Package~*.mum" set "_fixEP=19042"
@ -847,24 +852,27 @@ if exist "checker\Microsoft-Windows-SV*Enablement-Package~*.mum" for /f "tokens= @@ -847,24 +852,27 @@ if exist "checker\Microsoft-Windows-SV*Enablement-Package~*.mum" for /f "tokens=
)
)
)
if exist "checker\Microsoft-Windows-SV2Moment4Enablement-Package~*.mum" set "_fixEP=22631"
if exist "checker\Microsoft-Windows-SV2Moment5Enablement-Package~*.mum" set "_fixEP=22632"
if exist "checker\Microsoft-Windows-SV2Moment6Enablement-Package~*.mum" set "_fixEP=22633"
if %_build% geq 18362 if exist "checker\*enablement-package*.mum" (
expand.exe -f:*_microsoft-windows-e..-firsttimeinstaller_*.manifest "!repo!\!package!" "checker" %_Null%
%_exp% -f:*_microsoft-windows-e..-firsttimeinstaller_*.manifest "!repo!\!package!" "checker" %_Null%
if exist "checker\*_microsoft-windows-e..-firsttimeinstaller_*.manifest" set "_type=[Enablement / EdgeChromium]"
)
if not defined _type (
expand.exe -f:*_microsoft-windows-e..-firsttimeinstaller_*.manifest "!repo!\!package!" "checker" %_Null%
%_exp% -f:*_microsoft-windows-e..-firsttimeinstaller_*.manifest "!repo!\!package!" "checker" %_Null%
if exist "checker\*_microsoft-windows-e..-firsttimeinstaller_*.manifest" set "_type=[EdgeChromium]"
)
if not defined _type (
expand.exe -f:*_adobe-flash-for-windows_*.manifest "!repo!\!package!" "checker" %_Null%
%_exp% -f:*_adobe-flash-for-windows_*.manifest "!repo!\!package!" "checker" %_Null%
if exist "checker\*_adobe-flash-for-windows_*.manifest" findstr /i /m "Package_for_RollupFix" "checker\update.mum" %_Nul3% || set "_type=[Flash]"
)
echo %count%/%_sum%: %package% %_type%
if not exist "%dest%\update.mum" expand.exe -f:* "!repo!\!package!" "%dest%" %_Null% || (
if not exist "%dest%\update.mum" %_exp% -f:* "!repo!\!package!" "%dest%" %_Null% || (
rmdir /s /q "%dest%\" %_Nul3%
set directcab=!directcab! !package!
)
if exist "%dest%\*cablist.ini" expand.exe -f:* "%dest%\*.cab" "%dest%" %_Null% || (
if exist "%dest%\*cablist.ini" %_exp% -f:* "%dest%\*.cab" "%dest%" %_Null% || (
rmdir /s /q "%dest%\" %_Nul3%
set directcab=!directcab! !package!
)
@ -902,7 +910,7 @@ goto :eof @@ -902,7 +910,7 @@ goto :eof
:uupssu
if exist "!repo!\%compkg:~0,-4%*.cab" goto :eof
set kbupd=
expand.exe -f:update.mum "%dest%\chck\%compkg%" "%dest%\chck" %_Null%
%_exp% -f:update.mum "%dest%\chck\%compkg%" "%dest%\chck" %_Null%
if not exist "%dest%\chck\update.mum" goto :eof
for /f "tokens=3 delims== " %%# in ('findstr /i releaseType "%dest%\chck\update.mum"') do set kbupd=%%~#
if "%kbupd%"=="" goto :eof
@ -936,7 +944,7 @@ goto :eof @@ -936,7 +944,7 @@ goto :eof
:inrenssu
if exist "!repo!\%compkg:~0,-4%*.cab" goto :eof
set kbupd=
expand.exe -f:update.mum "%dest%\%compkg%" "%dest%" %_Null%
%_exp% -f:update.mum "%dest%\%compkg%" "%dest%" %_Null%
if not exist "%dest%\update.mum" goto :eof
for /f "tokens=3 delims== " %%# in ('findstr /i releaseType "%dest%\update.mum"') do set kbupd=%%~#
if "%kbupd%"=="" goto :eof
@ -1218,9 +1226,9 @@ if exist "%lcudir%\update.mum" if exist "%lcudir%\*.manifest" goto :eof @@ -1218,9 +1226,9 @@ if exist "%lcudir%\update.mum" if exist "%lcudir%\*.manifest" goto :eof
rem echo.
rem echo 1/1: %lcupkg% [LCU]
if not exist "%lcudir%\" mkdir "%lcudir%"
expand.exe -f:* "!repo!\%lcupkg%" "%lcudir%" %_Null%
%_exp% -f:* "!repo!\%lcupkg%" "%lcudir%" %_Null%
if exist "%lcudir%\*cablist.ini" (
expand.exe -f:* "%lcudir%\*.cab" "%lcudir%" %_Null%
%_exp% -f:* "%lcudir%\*.cab" "%lcudir%" %_Null%
del /f /q "%lcudir%\*cablist.ini" %_Nul3%
del /f /q "%lcudir%\*.cab" %_Nul3%
)
@ -1303,6 +1311,7 @@ findstr /i /m "Package_for_WindowsExperienceFeaturePack" "%dest%\update.mum" %_N @@ -1303,6 +1311,7 @@ findstr /i /m "Package_for_WindowsExperienceFeaturePack" "%dest%\update.mum" %_N
)
set "wnt=31bf3856ad364e35_10"
if exist "%dest%\%sss%_microsoft-updatetargeting-*os_31bf3856ad364e35_11.*.manifest" set "wnt=31bf3856ad364e35_11"
if exist "%dest%\%sss%_microsoft-updatetargeting-*os_31bf3856ad364e35_12.*.manifest" set "wnt=31bf3856ad364e35_12"
if exist "%dest%\%sss%_microsoft-updatetargeting-*os_%wnt%.%_fixEP%*.manifest" if not defined uupmaj (
for /f "tokens=5-7 delims=_." %%I in ('dir /b /a:-d /on "%dest%\%sss%_microsoft-updatetargeting-*os_%wnt%.%_fixEP%*.manifest"') do (set uupver=%%I.%%K&set uupmaj=%%I&set uupmin=%%K)
if %_fixEP% equ 0 for /f "tokens=5-7 delims=_." %%I in ('dir /b /a:-d /on "%dest%\%sss%_microsoft-updatetargeting-*os_%wnt%.%_fixEP%*.manifest"') do (set uupver=%%J.%%K&set uupmaj=%%J&set uupmin=%%K)
@ -1447,8 +1456,8 @@ for %%# in (inver_aa inver_bl inver_mj inver_mn kbver_aa kbver_bl kbver_mj kbver @@ -1447,8 +1456,8 @@ for %%# in (inver_aa inver_bl inver_mj inver_mn kbver_aa kbver_bl kbver_mj kbver
for /f %%I in ('dir /b /od "!mumcheck!"') do set _pkg=%%~nI
for /f "tokens=4-7 delims=~." %%H in ('echo %_pkg%') do set "inver_aa=%%H"&set "inver_bl=%%I"&set "inver_mj=%%J"&set "inver_mn=%%K"
mkdir "!_cabdir!\check"
if /i "%package:~-4%"==".msu" (expand.exe -f:*Windows*.cab "!repo!\!package!" "!_cabdir!\check" %_Nul3%) else (copy /y "!repo!\!package!" "!_cabdir!\check" %_Nul3%)
expand.exe -f:update.mum "!_cabdir!\check\*.cab" "!_cabdir!\check" %_Null%
if /i "%package:~-4%"==".msu" (%_exp% -f:*Windows*.cab "!repo!\!package!" "!_cabdir!\check" %_Nul3%) else (copy /y "!repo!\!package!" "!_cabdir!\check" %_Nul3%)
%_exp% -f:update.mum "!_cabdir!\check\*.cab" "!_cabdir!\check" %_Null%
if not exist "!_cabdir!\check\*.mum" (set skip=1&rmdir /s /q "!_cabdir!\check\"&goto :eof)
:: self note: do not add " at the end
for /f "tokens=5-8 delims==. " %%H in ('findstr /i %1 "!_cabdir!\check\update.mum"') do set "kbver_aa=%%~H"&set "kbver_bl=%%I"&set "kbver_mj=%%J"&set "kbver_mn=%%K
@ -1779,7 +1788,7 @@ goto :eof @@ -1779,7 +1788,7 @@ goto :eof
:tmprenssu
set kbssu=
mkdir "!_cabdir!\check"
if /i "%ssupkg:~-4%"==".msu" (expand.exe -f:*.txt "%ssupkg%" "!_cabdir!\check" %_Null%) else (expand.exe -f:update.mum "%ssupkg%" "!_cabdir!\check" %_Null%)
if /i "%ssupkg:~-4%"==".msu" (%_exp% -f:*.txt "%ssupkg%" "!_cabdir!\check" %_Null%) else (%_exp% -f:update.mum "%ssupkg%" "!_cabdir!\check" %_Null%)
if not exist "!_cabdir!\check\*.txt" if not exist "!_cabdir!\check\*.mum" (rmdir /s /q "!_cabdir!\check\"&goto :eof)
if exist "!_cabdir!\check\*.txt" (
for /f "tokens=2 delims==" %%# in ('findstr /i /c:"KB Article" "!_cabdir!\check\*.txt"') do set kbssu=KB%%~#
@ -1791,7 +1800,7 @@ if "%kbssu%"=="" (rmdir /s /q "!_cabdir!\check\"&goto :eof) @@ -1791,7 +1800,7 @@ if "%kbssu%"=="" (rmdir /s /q "!_cabdir!\check\"&goto :eof)
set _sfn=Windows10.0-%kbssu%-%arch%.cab
if %_build% geq 22563 set _sfn=Windows11.0-%kbssu%-%arch%.cab
if /i "%ssupkg:~-4%"==".msu" (
expand.exe -f:*%arch%*.cab "%ssupkg%" "!_cabdir!\check" %_Null%
%_exp% -f:*%arch%*.cab "%ssupkg%" "!_cabdir!\check" %_Null%
for /f %%# in ('dir /b "!_cabdir!\check\*.cab"') do copy /y "!_cabdir!\check\%%#" %_sfn% %_Nul3%
) else (
copy /y %ssupkg% %_sfn% %_Nul3%
@ -1945,8 +1954,12 @@ if exist "!mountdir!\Windows\Servicing\Packages\Microsoft-Windows-SV*Enablement- @@ -1945,8 +1954,12 @@ if exist "!mountdir!\Windows\Servicing\Packages\Microsoft-Windows-SV*Enablement-
set /a _fixEP=%_build%+%%i
)
)
if exist "!mountdir!\Windows\Servicing\Packages\Microsoft-Windows-SV2Moment4Enablement-Package~*.mum" set "_fixEP=22631"
if exist "!mountdir!\Windows\Servicing\Packages\Microsoft-Windows-SV2Moment5Enablement-Package~*.mum" set "_fixEP=22632"
if exist "!mountdir!\Windows\Servicing\Packages\Microsoft-Windows-SV2Moment6Enablement-Package~*.mum" set "_fixEP=22633"
set "wnt=31bf3856ad364e35_10"
if exist "!mountdir!\Windows\WinSxS\Manifests\%sss%_microsoft-updatetargeting-*os_31bf3856ad364e35_11.*.manifest" set "wnt=31bf3856ad364e35_11"
if exist "!mountdir!\Windows\WinSxS\Manifests\%sss%_microsoft-updatetargeting-*os_31bf3856ad364e35_12.*.manifest" set "wnt=31bf3856ad364e35_12"
if exist "!mountdir!\Windows\WinSxS\Manifests\%sss%_microsoft-updatetargeting-*os_%wnt%.%_fixEP%*.manifest" (
for /f "tokens=5-7 delims=_." %%I in ('dir /b /a:-d /od "!mountdir!\Windows\WinSxS\Manifests\%sss%_microsoft-updatetargeting-*os_%wnt%.%_fixEP%*.manifest"') do (set uupver=%%I.%%K&set uupmaj=%%I&set uupmin=%%K)
if %_fixEP% equ 0 for /f "tokens=5-7 delims=_." %%I in ('dir /b /a:-d /od "!mountdir!\Windows\WinSxS\Manifests\%sss%_microsoft-updatetargeting-*os_%wnt%.%_fixEP%*.manifest"') do (set uupver=%%J.%%K&set uupmaj=%%J&set uupmin=%%K)
@ -1995,9 +2008,10 @@ copy /y "!mountdir!\Windows\Boot\PCAT\bootmgr" "!target!\" %_Nul1% @@ -1995,9 +2008,10 @@ copy /y "!mountdir!\Windows\Boot\PCAT\bootmgr" "!target!\" %_Nul1%
copy /y "!mountdir!\Windows\Boot\EFI\memtest.efi" "!target!\efi\microsoft\boot\" %_Nul1%
copy /y "!mountdir!\Windows\Boot\PCAT\memtest.exe" "!target!\boot\" %_Nul1%
)
)
if exist "!target!\efi\boot\bootmgfw.efi" copy /y "!mountdir!\Windows\Boot\EFI\bootmgfw.efi" "!target!\efi\boot\bootmgfw.efi" %_Nul1%
copy /y "!mountdir!\Windows\Boot\EFI\bootmgfw.efi" "!target!\efi\boot\%efifile%" %_Nul1%
copy /y "!mountdir!\Windows\Boot\EFI\bootmgr.efi" "!target!\" %_Nul1%
)
if exist "!target!\setup.exe" copy /y "!mountdir!\setup.exe" "!target!\" %_Nul3%
if defined isoupdate if not exist "!mountdir!\Windows\Servicing\Packages\WinPE-Setup-Package~*.mum" (
set uupboot=1
@ -2077,6 +2091,10 @@ if %online%==1 ( @@ -2077,6 +2091,10 @@ if %online%==1 (
)
call :cleanmanual&goto :eof
)
set "_Nul8="
if %_build% geq 25380 (
set "_Nul8=1>nul 2>nul"
)
if %online%==0 (
set ksub=SOFTWIM
reg.exe load HKLM\!ksub! "!mumtarget!\Windows\System32\Config\SOFTWARE" %_Nul1%
@ -2097,7 +2115,7 @@ if /i %xOS%==x86 if /i not %arch%==x86 reg.exe save HKLM\%ksub% "!mumtarget!\Win @@ -2097,7 +2115,7 @@ if /i %xOS%==x86 if /i not %arch%==x86 reg.exe save HKLM\%ksub% "!mumtarget!\Win
reg.exe unload HKLM\!ksub! %_Nul1%
if /i %xOS%==x86 if /i not %arch%==x86 move /y "!mumtarget!\Windows\System32\Config\SOFTWARE2" "!mumtarget!\Windows\System32\Config\SOFTWARE" %_Nul1%
)
%_dism2%:"!_cabdir!" %dismtarget% /Cleanup-Image /StartComponentCleanup
%_dism2%:"!_cabdir!" %dismtarget% /Cleanup-Image /StartComponentCleanup %_Nul8%
if !errorlevel! equ 1726 %_dism2%:"!_cabdir!" %dismtarget% /Get-Packages %_Nul1%
) else (
echo.
@ -2113,9 +2131,9 @@ if /i %xOS%==x86 if /i not %arch%==x86 reg.exe save HKLM\%ksub% "!mumtarget!\Win @@ -2113,9 +2131,9 @@ if /i %xOS%==x86 if /i not %arch%==x86 reg.exe save HKLM\%ksub% "!mumtarget!\Win
reg.exe unload HKLM\!ksub! %_Nul1%
if /i %xOS%==x86 if /i not %arch%==x86 move /y "!mumtarget!\Windows\System32\Config\SOFTWARE2" "!mumtarget!\Windows\System32\Config\SOFTWARE" %_Nul1%
)
if %online%==0 if %_build% geq 16299 %_dism2%:"!_cabdir!" %dismtarget% /Cleanup-Image /StartComponentCleanup
if %online%==0 if %_build% geq 16299 %_dism2%:"!_cabdir!" %dismtarget% /Cleanup-Image /StartComponentCleanup %_Nul8%
if !errorlevel! equ 1726 %_dism2%:"!_cabdir!" %dismtarget% /Get-Packages %_Nul1%
%_dism2%:"!_cabdir!" %dismtarget% /Cleanup-Image /StartComponentCleanup /ResetBase
%_dism2%:"!_cabdir!" %dismtarget% /Cleanup-Image /StartComponentCleanup /ResetBase %_Nul8%
if !errorlevel! equ 1726 %_dism2%:"!_cabdir!" %dismtarget% /Get-Packages %_Nul1%
)
call :cleanmanual
@ -2193,6 +2211,82 @@ reg.exe add "HKLM\TEMP\ControlSet001\Control\Session Manager\Memory Management" @@ -2193,6 +2211,82 @@ reg.exe add "HKLM\TEMP\ControlSet001\Control\Session Manager\Memory Management"
reg.exe unload HKLM\TEMP %_Nul1%
goto :eof
:get_dpx
if %_embd% equ 0 (
echo ============================================================
echo Extracting dpx.dll file...
echo ============================================================
echo.
)
set _nat=0
set _wow=0
if /i %arch%==%xOS% set _nat=1
if /i %arch%==x64 if /i %xOS%==amd64 set _nat=1
if %_nat% equ 0 set _wow=1
if %_wow% equ 1 if exist "!repo!\DesktopDeployment_x86.cab" (
for /f "tokens=* delims=" %%# in ('dir /b /on "!repo!\DesktopDeployment_x86.cab"') do expand.exe -f:dpx.dll "!repo!\%%#" "!_cabdir!" %_Nul3%
if exist "!_cabdir!\dpx.dll" (
copy /y %SystemRoot%\SysWOW64\expand.exe "!_cabdir!\" %_Nul3%
set _exp="!_cabdir!\expand.exe"
exit /b
)
)
if %_nat% equ 1 if exist "!repo!\*DesktopDeployment.cab" (
for /f "tokens=* delims=" %%# in ('dir /b /on "!repo!\*DesktopDeployment.cab"') do expand.exe -f:dpx.dll "!repo!\%%#" "!_cabdir!" %_Nul3%
if exist "!_cabdir!\dpx.dll" (
copy /y %SysPath%\expand.exe "!_cabdir!\" %_Nul3%
set _exp="!_cabdir!\expand.exe"
exit /b
)
)
set msuwim=0
set "uupmsu="
if exist "!repo!\*Windows1*-KB*%arch%*.msu" for /f "tokens=* delims=" %%# in ('dir /b /on "!repo!\*Windows1*-KB*%arch%*.msu"') do (
expand.exe -d -f:*Windows*.psf "!repo!\%%#" %_Nul2% | findstr /i %arch%\.psf %_Nul3% && (set "uupmsu=%%#")
dism.exe /English /List-Image /ImageFile:"!repo!\%%#" /Index:1 %_Nul2% | findstr /i %arch%\.psf %_Nul3% && (set "uupmsu=%%#"&set msuwim=1)
)
if %msuwim% equ 1 if %_pwsh% equ 0 exit /b
if defined uupmsu if %msuwim% equ 0 (
if %_wow% equ 1 expand.exe -f:DesktopDeployment_x86.cab "!repo!\%uupmsu%" "!_cabdir!" %_Nul3%
if %_nat% equ 1 expand.exe -f:DesktopDeployment.cab "!repo!\%uupmsu%" "!_cabdir!" %_Nul3%
)
if defined uupmsu if %msuwim% equ 1 (
if %_wow% equ 1 powershell -nop -c "$f=[IO.File]::ReadAllText('!_batp!') -split ':wimmsu\:.*';iex ($f[1]);E '!repo!\%uupmsu%' 'DesktopDeployment_x86.cab' '!_cabdir!\DesktopDeployment_x86.cab'"
if %_nat% equ 1 powershell -nop -c "$f=[IO.File]::ReadAllText('!_batp!') -split ':wimmsu\:.*';iex ($f[1]);E '!repo!\%uupmsu%' 'DesktopDeployment.cab' '!_cabdir!\DesktopDeployment.cab'"
)
set dpxwim=install.wim
if %wim%==1 set "dpxwim=!target!"
if %dvd%==1 set "dpxwim=!target!\sources\install.wim"
if %_wow% equ 1 (
if exist "!_cabdir!\DesktopDeployment_x86.cab" (
expand.exe -f:dpx.dll "!_cabdir!\DesktopDeployment_x86.cab" "!_cabdir!" %_Nul3%
) else (
if %offline%==1 copy /y "!mountdir!\Windows\SysWOW64\dpx.dll" "!_cabdir!\" %_Nul3%
if %wimfiles%==1 powershell -nop -c "$f=[IO.File]::ReadAllText('!_batp!') -split ':wimmsu\:.*';iex ($f[1]);E '!dpxwim!' 'Windows\SysWOW64\dpx.dll' '!_cabdir!\dpx.dll'"
)
if exist "!_cabdir!\dpx.dll" (
copy /y %SystemRoot%\SysWOW64\expand.exe "!_cabdir!\" %_Nul3%
set _exp="!_cabdir!\expand.exe"
)
)
if %_nat% equ 1 (
if exist "!_cabdir!\DesktopDeployment.cab" (
expand.exe -f:dpx.dll "!_cabdir!\DesktopDeployment.cab" "!_cabdir!" %_Nul3%
) else (
if %offline%==1 copy /y "!mountdir!\Windows\System32\dpx.dll" "!_cabdir!\" %_Nul3%
if %wimfiles%==1 powershell -nop -c "$f=[IO.File]::ReadAllText('!_batp!') -split ':wimmsu\:.*';iex ($f[1]);E '!dpxwim!' 'Windows\System32\dpx.dll' '!_cabdir!\dpx.dll'"
)
if exist "!_cabdir!\dpx.dll" (
copy /y %SysPath%\expand.exe "!_cabdir!\" %_Nul3%
set _exp="!_cabdir!\expand.exe"
)
)
exit /b
:E_Target
echo.
echo ============================================================

152
W7ESUI/README.md

@ -0,0 +1,152 @@ @@ -0,0 +1,152 @@
# Windows 7 ESUs Standalone Installer
Automated batch script to install/integrate Windows 7 Extended Security Updates without the need for ESU eligibility suppressor or bypass.
## Features:
* Supported targets:
> Current Online OS
Offline image (already mounted directory, or another partition)
Distribution folder (extracted iso, copied dvd/usb)
Distribution Drive (virtual mounted iso, inserted dvd drive, usb drive)
WIM file directly (unmounted)
* Supports having updates in one folder:
> Detect and install servicing stack update first
Check required stack installer version for each update
Works with Monthly Quality Rollup, or Security Only update / IE11 cumulative update
Skip installing non-winpe updates for boot.wim/winre.wim (IE11 and .NET 3.5)
* Detect Windows 8.1 ADK [Deployment Tools](http://www.microsoft.com/en-us/download/details.aspx?id=39982) for offline integration and iso/wim updating
* Detect Windows NT 10.0 ADK [imagex.exe and oscdimg.exe](https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install) for iso/wim updating
## Limitations:
* SHA2 support updates KB4490628 and KB4474419 are prerequisites for ESU updates
either install them yourself first,
or put their msu files with ESU updates files together and the script will install them
* The script is specifically designed to process ESU updates only.
other regular updates should be installed normally
either manually or using other tools (e.g. WHD-W7UI script)
## How to:
* Recommended Host OS: Windows 7 or later
* Optional: place W7ESUI.cmd next to the updates (.msu/.cab) to detect them by default
* Run the script as administrator
* Change the options to suit your needs, make sure all are set correctly, do not use quotes marks "" in paths
* Press zero 0 to start the process
* At the end, Press 9 to exit, or close the windows with red X button
## Options:
Press each option corresponding number/letter to change it
**1.** Target
target windows image, default is current online system
if a wim file is available next to the script, it will be detected automatically
**2.** Updates
location of ESU updates files
**D.** DISM
the path for custom dism.exe
**U.** Update WinRE.wim
available only if the target is a distribution, or WIM file
enable or disable updating winre.wim inside install.wim
**I.** Install.wim selected indexes
available only if the target is a distribution, or WIM file
a choice to select specific index(s) to update from install.wim, or all indexes by default
**K.** Keep indexes
available only if you selected specific index(s) in above option [I]
a choice to only keep selected index(s) when rebuilding install.wim, or keep ALL indexes
**M.** Mount Directory
available only if the target is a distribution, or WIM file
mount directory for updating wim files, default is on the same drive as the script
**E.** Extraction Directory
directory for temporary extracted files, default is on the same drive as the script
## Configuration options (for advanced users):
- Edit W7ESUI.ini to change the default value of main options:
> Target
Repo
DismRoot
WinRE
Cab_Dir
MountDir
WinreMount
or set extra manual options below:
* ISO
create new iso file, if the target is a distribution
require installed ADK, or place oscdimg.exe or cdimage.exe next to the script
* ISODir
folder path for iso file, leave it blank to create in the script current directory
* Delete_Source
keep or delete DVD distribution folder after creating updated ISO
* AutoStart
start the process automatically once you execute the script
- Note: Do not change the structure of W7ESUI.ini, just set your options after the equal sign =
- To restore old behavior and change options by editing the script, simply detele W7ESUI.ini file
## Remarks:
* for offline integration, a simple script will be created on desktop RunOnce_W10_Telemetry_Tasks.cmd
after installing the OS, you need to run it as administrator, it will be self-deleted afterwards
* for offline integration, to rebuild wim files, you need one of:
> imagex.exe placed next to W7ESUI.cmd
Windows 8.1 ADK or Windows NT 10.0 ADK is installed
Host OS is Windows 8.1 or later
## Debug Mode (for advanced users):
* Create a log file of the integration process for debugging purposes
* The operation progress will not be shown in this mode
* How To:
> edit the script and change set _Debug=0 to 1
set main manual options correctly, specially "target" and "repo"
save and run the script as admin
wait until command prompt window is closed and Debug.log is created
## Credits:
[Creator](https://forums.mydigitallife.net/members/abbodi1406.204274/)
[Concept](https://github.com/Gamers-Against-Weed)
[WHDownloader](https://forums.mydigitallife.net/threads/44645)
[Special assistance: komm](http://www.windows-update-checker.com/)
## Changelog:
<details><summary>changelog</summary>
0.4:
- added support to install ESU Suppressor
0.3:
- enhanced detection for updates files and KB number
0.2:
- added support to install SHA2 updates KB4490628 and KB4474419 if detected
0.1:
- initial release
</details>

1493
W7ESUI/W7ESUI.cmd

File diff suppressed because it is too large Load Diff

15
W7ESUI/W7ESUI.ini

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
[W7ESUI-Configuration]
Target =
Repo =
DismRoot =dism.exe
Cab_Dir =W7ESUItemp
MountDir =W7ESUImount
WinreMount =W7ESUImountre
WinRE =1
ISO =1
ISODir =
Delete_Source =0
AutoStart =0

141
W81ESUI/README.md

@ -0,0 +1,141 @@ @@ -0,0 +1,141 @@
# Windows 8.1 ESUs Standalone Installer
Automated batch script to install/integrate Windows 8.1 Extended Security Updates without the need for ESU eligibility suppressor or bypass.
## Features:
* Supported targets:
> Current Online OS
Offline image (already mounted directory, or another partition)
Distribution folder (extracted iso, copied dvd/usb)
Distribution Drive (virtual mounted iso, inserted dvd drive, usb drive)
WIM file directly (unmounted)
* Supports having updates in one folder:
> Detect and install servicing stack update first
Check required stack installer version for each update
Works with Monthly Quality Rollup, or Security Only update / IE11 cumulative update
Skip installing non-winpe updates for boot.wim/winre.wim (IE11 and .NET 3.5)
* Detect Windows 8.1 ADK [Deployment Tools](http://www.microsoft.com/en-us/download/details.aspx?id=39982) for offline integration and iso/wim updating
* Detect Windows NT 10.0 ADK [imagex.exe and oscdimg.exe](https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install) for iso/wim updating
## Limitations:
* The script is specifically designed to process ESU updates only.
other regular updates should be installed normally
either manually or using other tools (e.g. WHD-W8.1UI script)
## How to:
* Recommended Host OS: Windows 8.1 or later
* Optional: place W81ESUI.cmd next to the updates (.msu/.cab) to detect them by default
* Run the script as administrator
* Change the options to suit your needs, make sure all are set correctly, do not use quotes marks "" in paths
* Press zero 0 to start the process
* At the end, Press 9 to exit, or close the windows with red X button
## Options:
Press each option corresponding number/letter to change it
**1.** Target
target windows image, default is current online system
if a wim file is available next to the script, it will be detected automatically
**2.** Updates
location of ESU updates files
**D.** DISM
the path for custom dism.exe
**U.** Update WinRE.wim
available only if the target is a distribution, or WIM file
enable or disable updating winre.wim inside install.wim
**I.** Install.wim selected indexes
available only if the target is a distribution, or WIM file
a choice to select specific index(s) to update from install.wim, or all indexes by default
**K.** Keep indexes
available only if you selected specific index(s) in above option [I]
a choice to only keep selected index(s) when rebuilding install.wim, or keep ALL indexes
**M.** Mount Directory
available only if the target is a distribution, or WIM file
mount directory for updating wim files, default is on the same drive as the script
**E.** Extraction Directory
directory for temporary extracted files, default is on the same drive as the script
## Configuration options (for advanced users):
- Edit W81ESUI.ini to change the default value of main options:
> Target
Repo
DismRoot
WinRE
Cab_Dir
MountDir
WinreMount
or set extra manual options below:
* ISO
create new iso file, if the target is a distribution
require installed ADK, or place oscdimg.exe or cdimage.exe next to the script
* ISODir
folder path for iso file, leave it blank to create in the script current directory
* Delete_Source
keep or delete DVD distribution folder after creating updated ISO
* AutoStart
start the process automatically once you execute the script
- Note: Do not change the structure of W81ESUI.ini, just set your options after the equal sign =
- To restore old behavior and change options by editing the script, simply detele W81ESUI.ini file
## Remarks:
* for offline integration, a simple script will be created on desktop RunOnce_W10_Telemetry_Tasks.cmd
after installing the OS, you need to run it as administrator, it will be self-deleted afterwards
* for offline integration, to rebuild wim files, you need one of:
> imagex.exe placed next to W81ESUI.cmd
Windows 8.1 ADK or Windows NT 10.0 ADK is installed
Host OS is Windows 8.1 or later
## Debug Mode (for advanced users):
* Create a log file of the integration process for debugging purposes
* The operation progress will not be shown in this mode
* How To:
> edit the script and change set _Debug=0 to 1
set main manual options correctly, specially "target" and "repo"
save and run the script as admin
wait until command prompt window is closed and Debug.log is created
## Credits:
[Creator](https://forums.mydigitallife.net/members/abbodi1406.204274/)
[Concept](https://github.com/Gamers-Against-Weed)
[WHDownloader](https://forums.mydigitallife.net/threads/44645)
[Special assistance: komm](http://www.windows-update-checker.com/)
## Changelog:
<details><summary>changelog</summary>
0.2:
- update ISO boot files bootmgr/bootmgr.efi from install.wim
0.1:
- initial release
</details>

1418
W81ESUI/W81ESUI.cmd

File diff suppressed because it is too large Load Diff

15
W81ESUI/W81ESUI.ini

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
[W81ESUI-Configuration]
Target =
Repo =
DismRoot =dism.exe
Cab_Dir =W81ESUItemp
MountDir =W81ESUImount
WinreMount =W81ESUImountre
WinRE =1
ISO =1
ISODir =
Delete_Source =0
AutoStart =0

3
WHD-W8.1UI/README.md

@ -185,6 +185,9 @@ after installing the OS, you need to run it as administrator, it will be self-de @@ -185,6 +185,9 @@ after installing the OS, you need to run it as administrator, it will be self-de
## Changelog:
* 7.2:
update ISO boot files bootmgr/bootmgr.efi from install.wim
* 7.1:
added support for ESU Suppressor

24
WHD-W8.1UI/WHD-W81UI.cmd

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
@setlocal DisableDelayedExpansion
@set uiv=v7.1
@set uiv=v7.2
@echo off
:: enable debug mode, you must also set target and repo (if updates folder is not beside the script)
set _Debug=0
@ -1258,17 +1258,17 @@ for /f "tokens=3-6 delims=.() " %%i in ('powershell -nop -c "(gi '!mountdir!\Win @@ -1258,17 +1258,17 @@ for /f "tokens=3-6 delims=.() " %%i in ('powershell -nop -c "(gi '!mountdir!\Win
goto :eof
:boots
xcopy /CDRY "!mountdir!\sources" "!target!\sources\" %_Nul3%
del /f /q "!target!\sources\background.bmp" %_Nul3%
del /f /q "!target!\sources\xmllite.dll" %_Nul3%
del /f /q "!target!\efi\microsoft\boot\*noprompt.*" %_Nul3%
rem copy /y "!mountdir!\Windows\Boot\DVD\EFI\en-US\efisys.bin" "!target!\efi\microsoft\boot\" %_Nul1%
copy /y "!mountdir!\Windows\Boot\EFI\memtest.efi" "!target!\efi\microsoft\boot\" %_Nul1%
copy /y "!mountdir!\Windows\Boot\EFI\bootmgfw.efi" "!target!\efi\boot\%efifile%" %_Nul1%
copy /y "!mountdir!\Windows\Boot\EFI\bootmgr.efi" "!target!\" %_Nul1%
copy /y "!mountdir!\Windows\Boot\PCAT\bootmgr" "!target!\" %_Nul1%
copy /y "!mountdir!\Windows\Boot\PCAT\memtest.exe" "!target!\boot\" %_Nul1%
if exist "!target!\setup.exe" copy /y "!mountdir!\setup.exe" "!target!\" %_Nul1%
xcopy /CDRY "!mountdir!\sources" "!target!\sources\" %_Nul3%
del /f /q "!target!\sources\background.bmp" %_Nul3%
del /f /q "!target!\sources\xmllite.dll" %_Nul3%
del /f /q "!target!\efi\microsoft\boot\*noprompt.*" %_Nul3%
rem copy /y "!mountdir!\Windows\Boot\DVD\EFI\en-US\efisys.bin" "!target!\efi\microsoft\boot\" %_Nul1%
copy /y "!mountdir!\Windows\Boot\PCAT\bootmgr" "!target!\" %_Nul1%
copy /y "!mountdir!\Windows\Boot\PCAT\memtest.exe" "!target!\boot\" %_Nul1%
copy /y "!mountdir!\Windows\Boot\EFI\memtest.efi" "!target!\efi\microsoft\boot\" %_Nul1%
copy /y "!mountdir!\Windows\Boot\EFI\bootmgfw.efi" "!target!\efi\boot\%efifile%" %_Nul1%
copy /y "!mountdir!\Windows\Boot\EFI\bootmgr.efi" "!target!\" %_Nul1%
if exist "!target!\setup.exe" copy /y "!mountdir!\setup.exe" "!target!\" %_Nul1%
goto :eof
:winre

2
uup-converter-wimlib/ConvertConfig.ini

@ -13,8 +13,10 @@ LCUwinre =0 @@ -13,8 +13,10 @@ LCUwinre =0
UpdtBootFiles=0
ForceDism =0
RefESD =0
SkipLCUmsu =0
SkipEdge =0
AutoExit =0
DisableUpdatingUpgrade=0
[Store_Apps]
SkipApps =0

30
uup-converter-wimlib/ReadMe.html

@ -156,12 +156,19 @@ @@ -156,12 +156,19 @@
<br />
<li>
<b>LCUwinre</b><br /><br />
Force updating winre.wim with Cumulative Update even if SafeOS update detected.
Force updating winre.wim with Cumulative Update even if SafeOS update detected.<br />
This option is auto enabled for Windows 11, Set this option to <strong>2</strong> to disable.
</li>
<br />
<li>
<b>UpdtBootFiles</b><br /><br />
Update ISO boot files bootmgr/bootmgr.efi/efisys.bin with new files from Cumulative Update.
Update ISO boot files bootmgr/memtest/efisys.bin with new files from Cumulative Update.<br /><br />
note: to accommodate KB5025885 changes, the two files bootmgr.efi/bootmgfw.efi will be always updated regardless this option.
</li>
<br />
<li>
<b>DisableUpdatingUpgrade</b><br /><br />
Disable updating process optimization by using editions upgrade (Home>Pro / ServerStandard>ServerDatacenter), and do separate updating for each edition.
</li>
<br />
<li>
@ -176,6 +183,10 @@ @@ -176,6 +183,10 @@
if UUP source is Canonical, Reference ESDs will be copied to the same UUP source folder, and original CAB files will be moved to subdirectory "Original".
</li>
<br />
<li>
<b>SkipLCUmsu</b><br /><br />
Skip creating Cumulative Update MSU for builds 21382 to 25330 (LCU will be added using legacy cab+psf extraction).
</li>
<li>
<b>SkipEdge</b><br /><br />
Set option to <strong>1</strong> : Do not integrate Microsoft Edge Chromium with Feature Update Enablement Package or Cumulative Update.<br />
@ -189,9 +200,12 @@ @@ -189,9 +200,12 @@
useful option for multi batch conversions, best used with <b>AutoStart</b> option.
</li>
<br />
<li>
<b>### Below options apply only for builds 22563 and later ###</b><br /><br />
</li>
<li>
<b>SkipApps</b><br /><br />
Do not add Store Apps for builds 22563 and later.
Do not add Store Apps.
</li>
<br />
<li>
@ -206,8 +220,11 @@ @@ -206,8 +220,11 @@
<br />
<li>
<b>CustomList</b><br /><br />
Enable using CustomAppsList.txt to pick and choose added Apps.<br /><br />
If enabled, this option takes precedence over AppsLevel option.
Enable using CustomAppsList.txt or CustomAppsList2.txt to pick and choose the added Apps.<br />
If enabled, this option takes precedence over AppsLevel option.<br /><br />
How to use:<br />
You can either use <b>CustomAppsList.txt</b> directly, or copy/rename it to <b>CustomAppsList2.txt</b><br />
Edit the choosen file, and remove <b>#</b> prefix in front the Apps you wish to add, and save the file.
</li>
</ul>
<hr />
@ -257,6 +274,9 @@ @@ -257,6 +274,9 @@
<br />
<li><u>Integrate</u> updates mode for ARM64 UUP images only works on <u>Windows 11/10/8.1 Host OS</u>.
</li>
<br />
<li><u>Integrate</u> updates mode for Windows 11 builds 22567 and later require at least <u>Windows 10 v1607 Host OS</u>.
</li>
</ul>
<br />
<h3><a name="UpdateHow"></a>How To</h3>

166
uup-converter-wimlib/convert-UUP.cmd

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<!-- : Begin batch script
@setlocal DisableDelayedExpansion
@set uivr=v89
@set uivr=v92
@echo off
:: Change to 1 to enable debug mode
set _Debug=0
@ -43,17 +43,24 @@ set SkipISO=0 @@ -43,17 +43,24 @@ set SkipISO=0
set SkipWinRE=0
:: Change to 1 to force updating winre.wim with Cumulative Update regardless if SafeOS update detected
:: auto enabled for Win11, change to 2 to disable
set LCUwinre=0
:: Change to 1 to update ISO boot files bootmgr/bootmgr.efi/efisys.bin from Cumulative Update
:: Change to 1 to update ISO boot files bootmgr/memtest/efisys.bin from Cumulative Update
set UpdtBootFiles=0
:: Change to 1 to disable updating process optimization by using editions upgrade (Home>Pro / ServerStandard>ServerDatacenter)
set DisableUpdatingUpgrade=0
:: Change to 1 to use dism.exe for creating boot.wim
set ForceDism=0
:: Change to 1 to keep converted Reference ESDs
set RefESD=0
:: Change to 1 to skip creating Cumulative Update MSU for builds 21382 to 25330
set SkipLCUmsu=0
:: Change to 1 for not integrating EdgeChromium with Enablement Package or Cumulative Update
:: Change to 2 for alternative workaround to avoid EdgeChromium with Cumulative Update only
set SkipEdge=0
@ -102,8 +109,8 @@ if /i %PROCESSOR_ARCHITECTURE%==x86 (if defined PROCESSOR_ARCHITEW6432 ( @@ -102,8 +109,8 @@ if /i %PROCESSOR_ARCHITECTURE%==x86 (if defined PROCESSOR_ARCHITEW6432 (
set "xOS=%PROCESSOR_ARCHITEW6432%"
)
)
set "xDS=bin\bin64;bin"
if /i not %xOS%==amd64 set "xDS=bin"
set "xDS=bin\bin64;bin;temp"
if /i not %xOS%==amd64 set "xDS=bin;temp"
set "Path=%xDS%;%SysPath%;%SystemRoot%;%SysPath%\Wbem;%SysPath%\WindowsPowerShell\v1.0\"
set "_err===== ERROR ===="
for /f "tokens=6 delims=[]. " %%# in ('ver') do set winbuild=%%#
@ -336,8 +343,10 @@ wim2esd @@ -336,8 +343,10 @@ wim2esd
wim2swm
ForceDism
RefESD
SkipLCUmsu
SkipEdge
AutoExit
DisableUpdatingUpgrade
SkipApps
AppsLevel
CustomList
@ -356,6 +365,7 @@ if %_Debug% neq 0 if %AutoStart% equ 0 set AutoStart=2 @@ -356,6 +365,7 @@ if %_Debug% neq 0 if %AutoStart% equ 0 set AutoStart=2
set _configured=0
if exist bin\temp\ rmdir /s /q bin\temp\
if exist temp\ rmdir /s /q temp\
if exist bin\expand.exe if not exist bin\dpx.dll del /f /q bin\expand.exe
mkdir bin\temp
mkdir temp
if %CustomList% neq 0 if exist "CustomAppsList*.txt" set _appsCustom=1
@ -363,6 +373,9 @@ set _updexist=0 @@ -363,6 +373,9 @@ set _updexist=0
if exist "!_UUP!\*Windows1*-KB*.msu" set _updexist=1
if exist "!_UUP!\*Windows1*-KB*.cab" set _updexist=1
if exist "!_UUP!\SSU-*-*.cab" set _updexist=1
set _pmcppc=0
if exist "!_UUP!\*Microsoft-Windows-Printing-PMCPPC-FoD-Package*.cab" set _pmcppc=1
if exist "!_UUP!\*Microsoft-Windows-Printing-PMCPPC-FoD-Package*.esd" set _pmcppc=1
dir /b /ad "!_UUP!\*Package*" %_Nul3% && set EXPRESS=1
for %%# in (
Core,CoreN,CoreSingleLanguage,CoreCountrySpecific
@ -544,8 +557,10 @@ wim2esd @@ -544,8 +557,10 @@ wim2esd
wim2swm
ForceDism
RefESD
SkipLCUmsu
SkipEdge
AutoExit
DisableUpdatingUpgrade
SkipApps
AppsLevel
CustomList
@ -576,10 +591,12 @@ echo. @@ -576,10 +591,12 @@ echo.
ForceDism
RefESD
AutoExit
DisableUpdatingUpgrade
) do (
if !%%#! neq 0 echo %%#
)
)
if %_build% geq 21382 if %SkipLCUmsu% neq 0 echo SkipLCUmsu
if %_build% geq 18362 if %AddUpdates% equ 1 if %SkipEdge% neq 0 echo SkipEdge %SkipEdge%
if %_build% geq 22563 if %W10UI% neq 0 (
if %SkipApps% neq 0 echo SkipApps
@ -743,8 +760,10 @@ LCUwinre @@ -743,8 +760,10 @@ LCUwinre
wim2esd
wim2swm
RefESD
SkipLCUmsu
SkipEdge
AutoExit
DisableUpdatingUpgrade
SkipApps
AppsLevel
CustomList
@ -770,10 +789,12 @@ echo. @@ -770,10 +789,12 @@ echo.
wim2swm
RefESD
AutoExit
DisableUpdatingUpgrade
) do (
if !%%#! neq 0 echo %%#
)
)
if %_build% geq 21382 if %SkipLCUmsu% neq 0 echo SkipLCUmsu
if %_build% geq 18362 if %AddUpdates% equ 1 if %SkipEdge% neq 0 echo SkipEdge %SkipEdge%
if %_build% geq 22563 if %W10UI% neq 0 (
if %SkipApps% neq 0 echo SkipApps
@ -875,7 +896,8 @@ if !_ESDSrv%%#! equ 1 ( @@ -875,7 +896,8 @@ if !_ESDSrv%%#! equ 1 (
wimlib-imagex.exe info %_file% %%# --image-property DISPLAYNAME="!_dName%%#!" --image-property DISPLAYDESCRIPTION="!_dDesc%%#!" --image-property FLAGS=!edition%%#! %_Nul3%
)
)
if %_reMSU% equ 1 call :uups_msu
if %_updexist% equ 1 if %_build% geq 22000 if exist "%SysPath%\ucrtbase.dll" if not exist "bin\dpx.dll" if not exist "temp\dpx.dll" call :uups_dpx
if %_reMSU% equ 1 if %SkipLCUmsu% equ 0 call :uups_msu
if %AddUpdates% neq 1 if %W10UI% neq 0 if %_runIPA% equ 1 (
if exist "!_cabdir!\" rmdir /s /q "!_cabdir!\"
del /f /q %_dLog%\* %_Nul3%
@ -1063,6 +1085,15 @@ if exist "!_UUP!\*.*xbundle" set _IPA=1 @@ -1063,6 +1085,15 @@ if exist "!_UUP!\*.*xbundle" set _IPA=1
if exist "!_UUP!\*.appx" set _IPA=1
if exist "!_UUP!\Apps\*_8wekyb3d8bbwe" set _IPA=1
)
set _dpx=0
if %_updexist% equ 1 if %_build% geq 22000 if exist "%SysPath%\ucrtbase.dll" if exist "!_UUP!\*DesktopDeployment*.cab" (
if /i %arch%==%xOS% set _dpx=1
if /i %arch%==x64 if /i %xOS%==amd64 set _dpx=1
)
if %_dpx% equ 1 (
for /f "delims=" %%# in ('dir /b /a:-d "!_UUP!\*DesktopDeployment*.cab"') do expand.exe -f:dpx.dll "!_UUP!\%%#" .\temp %_Null%
copy /y %SysPath%\expand.exe temp\ %_Nul3%
)
wimlib-imagex.exe extract "!MetadataESD!" 1 sources\ei.cfg --dest-dir=.\bin\temp --no-acls --no-attributes %_Nul3%
if exist "bin\temp\ei.cfg" type .\bin\temp\ei.cfg %_Nul2% | find /i "Volume" %_Nul1% && set VOL=1
wimlib-imagex.exe extract "!MetadataESD!" 1 sources\setuphost.exe --dest-dir=.\bin\temp --no-acls --no-attributes %_Nul3%
@ -1216,6 +1247,7 @@ echo %~1| find /i "RetailDemo" %_Nul1% && exit /b @@ -1216,6 +1247,7 @@ echo %~1| find /i "RetailDemo" %_Nul1% && exit /b
echo %~1| find /i "Holographic-Desktop-FOD" %_Nul1% && exit /b
echo %~1| find /i "Windows10.0-KB" %_Nul1% && exit /b
echo %~1| find /i "Windows11.0-KB" %_Nul1% && exit /b
echo %~1| find /i "Windows12.0-KB" %_Nul1% && exit /b
echo %~1| find /i "SSU-" %_Nul1% && exit /b
set cbsp=%~1
if exist "!_work!\temp\%cbsp%.ESD" exit /b
@ -1229,6 +1261,7 @@ echo %~1| find /i "RetailDemo" %_Nul1% && exit /b @@ -1229,6 +1261,7 @@ echo %~1| find /i "RetailDemo" %_Nul1% && exit /b
echo %~1| find /i "Holographic-Desktop-FOD" %_Nul1% && exit /b
echo %~1| find /i "Windows10.0-KB" %_Nul1% && exit /b
echo %~1| find /i "Windows11.0-KB" %_Nul1% && exit /b
echo %~1| find /i "Windows12.0-KB" %_Nul1% && exit /b
echo %~1| find /i "SSU-" %_Nul1% && exit /b
set cbsp=%~n1
if exist "!_work!\temp\%cbsp%.ESD" exit /b
@ -1337,6 +1370,36 @@ set "_name%1=!_oname%1! [!arch%1! / !langid%1!]" @@ -1337,6 +1370,36 @@ set "_name%1=!_oname%1! [!arch%1! / !langid%1!]"
del /f /q bin\info*.txt
exit /b
:uups_dpx
set _nat=0
set _wow=0
if /i %arch%==%xOS% set _nat=1
if /i %arch%==x64 if /i %xOS%==amd64 set _nat=1
if %_nat% equ 0 set _wow=1
set msuwim=0
set "uupmsu="
if exist "!_UUP!\*Windows1*-KB*.msu" for /f "tokens=* delims=" %%# in ('dir /b /on "!_UUP!\*Windows1*-KB*.msu"') do (
expand.exe -d -f:*Windows*.psf "!_UUP!\%%#" %_Nul2% | findstr /i %arch%\.psf %_Nul3% && (set "uupmsu=%%#")
wimlib-imagex.exe dir "!_UUP!\%%#" %_Nul2% | findstr /i %arch%\.psf %_Nul3% && (set "uupmsu=%%#"&set msuwim=1)
)
if defined uupmsu if %msuwim% equ 0 (
if %_wow% equ 1 expand.exe -f:DesktopDeployment_x86.cab "!_UUP!\%uupmsu%" .\temp %_Null%
if %_nat% equ 1 expand.exe -f:DesktopDeployment.cab "!_UUP!\%uupmsu%" .\temp %_Null%
)
if defined uupmsu if %msuwim% equ 1 (
if %_wow% equ 1 wimlib-imagex.exe extract "!_UUP!\%uupmsu%" 1 DesktopDeployment_x86.cab --dest-dir=.\temp %_Nul3%
if %_nat% equ 1 wimlib-imagex.exe extract "!_UUP!\%uupmsu%" 1 DesktopDeployment.cab --dest-dir=.\temp %_Nul3%
)
if %_wow% equ 1 (
if exist "temp\DesktopDeployment_x86.cab" (expand.exe -f:dpx.dll "temp\DesktopDeployment_x86.cab" .\temp %_Null%) else (wimlib-imagex.exe extract %_file% 1 Windows\SysWOW64\dpx.dll --dest-dir=.\temp --no-acls --no-attributes %_Nul3%)
if exist "temp\dpx.dll" copy /y %SystemRoot%\SysWOW64\expand.exe temp\ %_Nul3%
)
if %_nat% equ 1 (
if exist "temp\DesktopDeployment.cab" (expand.exe -f:dpx.dll "temp\DesktopDeployment.cab" .\temp %_Null%) else (wimlib-imagex.exe extract %_file% 1 Windows\System32\dpx.dll --dest-dir=.\temp --no-acls --no-attributes %_Nul3%)
if exist "temp\dpx.dll" copy /y %SysPath%\expand.exe temp\ %_Nul3%
)
exit /b
:uups_msu
echo.
echo %line%
@ -1378,6 +1441,7 @@ for /f "delims=" %%# in ('dir /b /a:-d "*Windows1*%_MSUkbn%*%arch%*.cab"') do se @@ -1378,6 +1441,7 @@ for /f "delims=" %%# in ('dir /b /a:-d "*Windows1*%_MSUkbn%*%arch%*.cab"') do se
for /f "delims=" %%# in ('dir /b /a:-d "*Windows1*%_MSUkbn%*%arch%*.psf"') do set "_MSUpsf=%%#"
set "_MSUkbf=Windows10.0-%_MSUkbn%-%arch%"
echo %_MSUcab%| findstr /i "Windows11\." %_Nul1% && set "_MSUkbf=Windows11.0-%_MSUkbn%-%arch%"
echo %_MSUcab%| findstr /i "Windows12\." %_Nul1% && set "_MSUkbf=Windows12.0-%_MSUkbn%-%arch%"
if exist "SSU-*%arch%*.cab" (
for /f "tokens=2 delims=-" %%# in ('dir /b /a:-d "SSU-*%arch%*.cab"') do set "_MSUtsu=SSU-%%#-%arch%.cab"
for /f "delims=" %%# in ('dir /b /a:-d "SSU-*%arch%*.cab"') do set "_MSUssu=%%#"
@ -1441,9 +1505,9 @@ wimlib-imagex.exe extract %_file% 1 Windows\WinSxS\%%~n# --dest-dir="!_UUP!\_tSS @@ -1441,9 +1505,9 @@ wimlib-imagex.exe extract %_file% 1 Windows\WinSxS\%%~n# --dest-dir="!_UUP!\_tSS
)
pushd "!_UUP!"
:ssuouter64
set xbt=%arch%
if /i %arch%==x64 set xbt=amd64
for /f %%# in ('dir /b /ad "_tSSU\%xbt%_microsoft-windows-servicingstack_*"') do set "src=%%#"
set btx=%arch%
if /i %arch%==x64 set btx=amd64
for /f %%# in ('dir /b /ad "_tSSU\%btx%_microsoft-windows-servicingstack_*"') do set "src=%%#"
for %%# in (%_MSUdll%) do if exist "_tSSU\%src%\%%#" (move /y "_tSSU\%src%\%%#" "_tSSU\000\%%#" %_Nul1%)
call :crDDF %_MSUddc%
call :apDDF _tSSU\000
@ -1604,7 +1668,7 @@ exit /b @@ -1604,7 +1668,7 @@ exit /b
:uups_external
echo.
echo %line%
echo Adding updates files to ISO distribution . . .
echo Adding updated files to ISO distribution . . .
echo %line%
echo.
if not exist "!_cabdir!\" mkdir "!_cabdir!"
@ -1630,12 +1694,16 @@ if exist "!_cabdir!\Microsoft-Windows-SV*Enablement-Package~*.mum" for /f "token @@ -1630,12 +1694,16 @@ if exist "!_cabdir!\Microsoft-Windows-SV*Enablement-Package~*.mum" for /f "token
)
)
)
if exist "!_cabdir!\Microsoft-Windows-SV2Moment4Enablement-Package~*.mum" set "_fixSV=22631"&set "_fixEP=22631"
if exist "!_cabdir!\Microsoft-Windows-SV2Moment5Enablement-Package~*.mum" set "_fixSV=22632"&set "_fixEP=22632"
if exist "!_cabdir!\Microsoft-Windows-SV2Moment6Enablement-Package~*.mum" set "_fixSV=22633"&set "_fixEP=22633"
set tmpcmp=
if %_build% geq 21382 if exist "!_UUP!\*Windows1*-KB*.msu" for /f "tokens=* delims=" %%# in ('dir /b /os "!_UUP!\*Windows1*-KB*.msu"') do (set "packn=%%~n#"&set "packf=%%#"&call :external_msu)
if exist "!_UUP!\SSU-*-*.cab" for /f "tokens=* delims=" %%# in ('dir /b /os "!_UUP!\SSU-*-*.cab"') do (set "packn=%%~n#"&set "packf=%%#"&call :external_cab)
if exist "!_UUP!\*Windows1*-KB*.cab" for /f "tokens=* delims=" %%# in ('dir /b /os "!_UUP!\*Windows1*-KB*.cab"') do (set "packn=%%~n#"&set "packf=%%#"&call :external_cab)
if defined tmpcmp if exist "!_UUP!\Windows10.0-*%arch%_inout.cab" for /f "tokens=* delims=" %%# in ('dir /b /os "!_UUP!\Windows10.0-*%arch%_inout.cab"') do (set "packn=%%~n#"&set "packf=%%#"&call :external_cab)
if defined tmpcmp if exist "!_UUP!\Windows11.0-*%arch%_inout.cab" for /f "tokens=* delims=" %%# in ('dir /b /os "!_UUP!\Windows11.0-*%arch%_inout.cab"') do (set "packn=%%~n#"&set "packf=%%#"&call :external_cab)
if defined tmpcmp if exist "!_UUP!\Windows12.0-*%arch%_inout.cab" for /f "tokens=* delims=" %%# in ('dir /b /os "!_UUP!\Windows12.0-*%arch%_inout.cab"') do (set "packn=%%~n#"&set "packf=%%#"&call :external_cab)
if not exist "!_dest!\*Windows1*-KB*.msu" if not exist "!_dest!\*Windows1*-KB*.cab" if not exist "!_dest!\*SSU-*-*.cab" (
rmdir /s /q "ISOFOLDER\sources\$OEM$\"
exit /b
@ -1784,20 +1852,22 @@ expand.exe -f:%_ss%_microsoft-updatetargeting-*os_*.manifest "!_UUP!\%packf%" "! @@ -1784,20 +1852,22 @@ expand.exe -f:%_ss%_microsoft-updatetargeting-*os_*.manifest "!_UUP!\%packf%" "!
)
if %_build% geq 21382 if exist "!_cabdir!\*_microsoft-updatetargeting-*os_*.manifest" (
mkdir bin\sxs
for /f %%a in ('dir /b /a:-d "!_cabdir!\*_microsoft-updatetargeting-*os_*.manifest"') do SxSExpand.exe "!_cabdir!\%%a" bin\sxs\%%a %_Nul1%
if exist "bin\sxs\*.manifest" move /y bin\sxs\* "!_cabdir!\" %_Nul1%
for /f %%a in ('dir /b /a:-d "!_cabdir!\*_microsoft-updatetargeting-*os_*.manifest"') do SxSExpand.exe "!_cabdir!\%%a" "bin\sxs\%%a" %_Nul3%
if exist "bin\sxs\*.manifest" move /y "bin\sxs\*" "!_cabdir!\" %_Nul1%
rmdir /s /q bin\sxs\
)
if exist "!_cabdir!\*_microsoft-updatetargeting-*os_*.manifest" for /f "tokens=8 delims== " %%# in ('findstr /i Branch "!_cabdir!\*_microsoft-updatetargeting-*os_*.manifest"') do if not defined regbranch set regbranch=%%~#
if defined regbranch set branch=%regbranch%
set "wnt=31bf3856ad364e35_10"
if exist "!_cabdir!\*_microsoft-updatetargeting-*os_31bf3856ad364e35_11.*.manifest" set "wnt=31bf3856ad364e35_11"
set "wnt=%_Pkt%_10"
if exist "!_cabdir!\*_microsoft-updatetargeting-*os_%_Pkt%_11.*.manifest" set "wnt=%_Pkt%_11"
if exist "!_cabdir!\*_microsoft-updatetargeting-*os_%_Pkt%_12.*.manifest" set "wnt=%_Pkt%_12"
if %_actEP% equ 1 if exist "!_cabdir!\*_microsoft-updatetargeting-*os_%wnt%.%_fixEP%*.manifest" (
for /f "tokens=8 delims== " %%# in ('findstr /i Branch "!_cabdir!\*_microsoft-updatetargeting-*os_%wnt%.%_fixEP%*.manifest"') do set branch=%%~#
for /f "tokens=%toe% delims=_." %%I in ('dir /b /a:-d /on "!_cabdir!\*_microsoft-updatetargeting-*os_%wnt%.%_fixEP%*.manifest"') do if %%I gtr !uupmaj! (
set uupver=%%I.%%K
set uupmaj=%%I
set uupmin=%%K
set "_fixSV=!uupmaj!"&set "_fixEP=!uupmaj!"
)
)
@ -2004,6 +2074,7 @@ if exist "!_UUP!\SSU-*-*.cab" for /f "tokens=* delims=" %%# in ('dir /b /on "!_U @@ -2004,6 +2074,7 @@ if exist "!_UUP!\SSU-*-*.cab" for /f "tokens=* delims=" %%# in ('dir /b /on "!_U
if exist "!_UUP!\*Windows1*-KB*.cab" for /f "tokens=* delims=" %%# in ('dir /b /on "!_UUP!\*Windows1*-KB*.cab"') do (set "pkgn=%%~n#"&set "package=%%#"&set "dest=!_cabdir!\%%~n#"&call :cab2)
if defined tmpcmp if exist "!_UUP!\Windows10.0-*%arch%_inout.cab" for /f "tokens=* delims=" %%# in ('dir /b /on "!_UUP!\Windows10.0-*%arch%_inout.cab"') do (set "pkgn=%%~n#"&set "package=%%#"&set "dest=!_cabdir!\%%~n#"&call :cab2)
if defined tmpcmp if exist "!_UUP!\Windows11.0-*%arch%_inout.cab" for /f "tokens=* delims=" %%# in ('dir /b /on "!_UUP!\Windows11.0-*%arch%_inout.cab"') do (set "pkgn=%%~n#"&set "package=%%#"&set "dest=!_cabdir!\%%~n#"&call :cab2)
if defined tmpcmp if exist "!_UUP!\Windows12.0-*%arch%_inout.cab" for /f "tokens=* delims=" %%# in ('dir /b /on "!_UUP!\Windows12.0-*%arch%_inout.cab"') do (set "pkgn=%%~n#"&set "package=%%#"&set "dest=!_cabdir!\%%~n#"&call :cab2)
goto :eof
:sum2msu
@ -2143,6 +2214,9 @@ if exist "!dest!\Microsoft-Windows-SV*Enablement-Package~*.mum" for /f "tokens=3 @@ -2143,6 +2214,9 @@ if exist "!dest!\Microsoft-Windows-SV*Enablement-Package~*.mum" for /f "tokens=3
)
)
)
if exist "!dest!\Microsoft-Windows-SV2Moment4Enablement-Package~*.mum" set "_fixSV=22631"&set "_fixEP=22631"
if exist "!dest!\Microsoft-Windows-SV2Moment5Enablement-Package~*.mum" set "_fixSV=22632"&set "_fixEP=22632"
if exist "!dest!\Microsoft-Windows-SV2Moment6Enablement-Package~*.mum" set "_fixSV=22633"&set "_fixEP=22633"
if %_build% geq 18362 if exist "!dest!\*enablement-package*.mum" (
expand.exe -f:*_microsoft-windows-e..-firsttimeinstaller_*.manifest "!_UUP!\%package%" "!dest!" %_Null%
if exist "!dest!\*_microsoft-windows-e..-firsttimeinstaller_*.manifest" set "_type=[Enablement / EdgeChromium]"
@ -2235,6 +2309,7 @@ exit /b @@ -2235,6 +2309,7 @@ exit /b
for /f "tokens=2 delims=-" %%V in ('echo %compkg%') do set kbupd=%%V
set _ufn=Windows10.0-%kbupd%-%arch%_inout.cab
echo %compkg%| findstr /i "Windows11\." %_Nul1% && set _ufn=Windows11.0-%kbupd%-%arch%_inout.cab
echo %compkg%| findstr /i "Windows12\." %_Nul1% && set _ufn=Windows12.0-%kbupd%-%arch%_inout.cab
if exist "!_UUP!\%_ufn%" goto :eof
call set /a _cab+=1
set "tmpcmp=!tmpcmp! %_ufn%"
@ -2250,6 +2325,7 @@ for /f "tokens=3 delims== " %%# in ('findstr /i releaseType "!_cabdir!\lcu\updat @@ -2250,6 +2325,7 @@ for /f "tokens=3 delims== " %%# in ('findstr /i releaseType "!_cabdir!\lcu\updat
if "%kbupd%"=="" goto :eof
set _ufn=Windows10.0-%kbupd%-%arch%_inout.cab
dir /b /on "!_cabdir!\lcu\*Windows1*-KB*.cab" %_Nul2% | findstr /i "Windows11\." %_Nul1% && set _ufn=Windows11.0-%kbupd%-%arch%_inout.cab
dir /b /on "!_cabdir!\lcu\*Windows1*-KB*.cab" %_Nul2% | findstr /i "Windows12\." %_Nul1% && set _ufn=Windows12.0-%kbupd%-%arch%_inout.cab
if exist "!_UUP!\%_ufn%" goto :eof
call set /a _cab+=1
set "tmpcmp=!tmpcmp! %_ufn%"
@ -2258,7 +2334,7 @@ goto :eof @@ -2258,7 +2334,7 @@ goto :eof
:updatewim
set mumtarget=%_mount%
set dismtarget=/image:"%_mount%"
set dismtarget=/Image:"%_mount%"
set SOFTWARE=uiSOFTWARE
set COMPONENTS=uiCOMPONENTS
set "_Wnn=HKLM\%SOFTWARE%\Microsoft\Windows\CurrentVersion\SideBySide\Winners"
@ -2344,14 +2420,14 @@ if /i not "!=ExitCode!"=="00000000" if /i not "!=ExitCode!"=="800f081e" goto :er @@ -2344,14 +2420,14 @@ if /i not "!=ExitCode!"=="00000000" if /i not "!=ExitCode!"=="800f081e" goto :er
if not defined overall call :cleanup
)
if not defined overall if not defined mpamfe goto :eof
if %_build% geq 22000 set LCUwinre=1
if %_build% geq 22000 if %LCUwinre% neq 2 set LCUwinre=1
if defined safeos if %SkipWinRE% equ 0 (
set callclean=1
%_dism2%:"!_cabdir!" %dismtarget% /LogPath:"%_dLog%\DismWinPE.log" /Add-Package %safeos%
cmd /c exit /b !errorlevel!
if /i not "!=ExitCode!"=="00000000" if /i not "!=ExitCode!"=="800f081e" goto :errmount
)
if defined safeos if %SkipWinRE% equ 0 if %LCUwinre% equ 0 (
if defined safeos if %SkipWinRE% equ 0 if %LCUwinre% neq 1 (
set relite=1
if not defined lcumsu call :cleanup
if not defined lcumsu if %ResetBase% equ 0 %_dism2%:"!_cabdir!" %dismtarget% /Cleanup-Image /StartComponentCleanup /ResetBase %_Null%
@ -2868,8 +2944,9 @@ if not exist "%_mount%\" mkdir "%_mount%" @@ -2868,8 +2944,9 @@ if not exist "%_mount%\" mkdir "%_mount%"
set _www=%~1
set _nnn=%~nx1
for %%# in (handle1,handle2,eHome,eHomN,eProf,eProN,uProf,uProN,eSSC,eSSD,eSDC,eSDD,uSDC,uSDD,_upgr) do set %%#=0
if %_build% geq 25380 if %Cleanup% equ 0 set DisableUpdatingUpgrade=1
if /i not %_nnn%==winre.wim (
if %_build% geq 17063 if %imgcount% gtr 1 set _upgr=1
if %_build% geq 17063 if %imgcount% gtr 1 if %DisableUpdatingUpgrade% equ 0 set _upgr=1
for /L %%# in (1,1,%imgcount%) do imagex /info "%_www%" %%# >bin\info%%#.txt 2>&1
)
if %_upgr% equ 1 for /L %%# in (1,1,%imgcount%) do (
@ -2897,10 +2974,12 @@ set /a imgcount-=1 @@ -2897,10 +2974,12 @@ set /a imgcount-=1
%_dism1% /Delete-Image /ImageFile:"%_www%" /Index:%iSDC% %_Nul3%
)
if %uProN% equ 1 (
if %_pmcppc% equ 1 if %_build% geq 19041 call :pmcppcpro %iProN%
set /a imgcount-=1
%_dism1% /Delete-Image /ImageFile:"%_www%" /Index:%iProN% %_Nul3%
)
if %uProf% equ 1 (
if %_pmcppc% equ 1 if %_build% geq 19041 call :pmcppcpro %iProf%
set /a imgcount-=1
%_dism1% /Delete-Image /ImageFile:"%_www%" /Index:%iProf% %_Nul3%
)
@ -3028,23 +3107,27 @@ call :appx_wim @@ -3028,23 +3107,27 @@ call :appx_wim
echo.
echo Adding Updates . . .
)
if /i not %_nnn%==winre.wim if %_upgr% equ 1 if %_pmcppc% equ 1 if %_build% geq 19041 if not exist "%_mount%\Windows\Servicing\Packages\Microsoft-Windows-Printing-PMCPPC-FoD-Package*.mum" call :pmcppcwim
call :updatewim
if defined mounterr goto :eof
if %NetFx3% equ 1 if %dvd% equ 1 call :enablenet35
if !handle1! equ 0 if %dvd% equ 1 if %UpdtBootFiles% equ 1 (
set handle1=1
if /i %arch%==x86 (set efifile=bootia32.efi) else if /i %arch%==x64 (set efifile=bootx64.efi) else (set efifile=bootaa64.efi)
if !handle1! equ 0 if %dvd% equ 1 (
set handle1=1
if %UpdtBootFiles% equ 1 (
for %%i in (efisys.bin,efisys_noprompt.bin) do if exist "%_mount%\Windows\Boot\DVD\EFI\en-US\%%i" (xcopy /CIDRY "%_mount%\Windows\Boot\DVD\EFI\en-US\%%i" "%_target%\efi\microsoft\boot\" %_Nul3%)
if /i not %arch%==arm64 (
xcopy /CIDRY "%_mount%\Windows\Boot\PCAT\bootmgr" "%_target%\" %_Nul3%
xcopy /CIDRY "%_mount%\Windows\Boot\PCAT\memtest.exe" "%_target%\boot\" %_Nul3%
xcopy /CIDRY "%_mount%\Windows\Boot\EFI\memtest.efi" "%_target%\efi\microsoft\boot\" %_Nul3%
)
xcopy /CIDRY "%_mount%\Windows\Boot\EFI\bootmgfw.efi" "%_target%\efi\boot\!efifile!" %_Nul3%
xcopy /CIDRY "%_mount%\Windows\Boot\EFI\bootmgr.efi" "%_target%\" %_Nul3%
if exist "%_mount%\Windows\Boot\EFI\winsipolicy.p7b" if exist "%_target%\efi\microsoft\boot\winsipolicy.p7b" xcopy /CEDRY "%_mount%\Windows\Boot\EFI\winsipolicy.p7b" "%_target%\efi\microsoft\boot\winsipolicy.p7b" %_Nul3%
if exist "%_mount%\Windows\Boot\EFI\CIPolicies\" if exist "%_target%\efi\microsoft\boot\cipolicies\" xcopy /CEDRY "%_mount%\Windows\Boot\EFI\CIPolicies\*" "%_target%\efi\microsoft\boot\cipolicies\" %_Nul3%
)
if exist "%_target%\efi\boot\bootmgfw.efi" xcopy /CIDRY "%_mount%\Windows\Boot\EFI\bootmgfw.efi" "%_target%\efi\boot\bootmgfw.efi" %_Nul3%
xcopy /CIDRY "%_mount%\Windows\Boot\EFI\bootmgfw.efi" "%_target%\efi\boot\!efifile!" %_Nul3%
xcopy /CIDRY "%_mount%\Windows\Boot\EFI\bootmgr.efi" "%_target%\" %_Nul3%
)
if !handle2! equ 0 if %dvd% equ 1 if not exist "%_mount%\Windows\Servicing\Packages\*WinPE-LanguagePack*.mum" if exist "%_mount%\Windows\Servicing\Packages\Package_for_RollupFix*.mum" (
set handle2=1
set isomin=0
@ -3056,6 +3139,7 @@ for /f %%i in ('"offlinereg.exe "%_mount%\Windows\system32\config\SOFTWARE" "!is @@ -3056,6 +3139,7 @@ for /f %%i in ('"offlinereg.exe "%_mount%\Windows\system32\config\SOFTWARE" "!is
set "isover=%%~A.%%B
set isomaj=%%~A
set "isomin=%%B
set "_fixSV=!isomaj!"&set "_fixEP=!isomaj!"
)
)
)
@ -3069,6 +3153,31 @@ if !errorlevel! neq 0 ( @@ -3069,6 +3153,31 @@ if !errorlevel! neq 0 (
)
goto :eof
:pmcppcpro
if exist "bin\temp\pmcppc\Microsoft-Windows-Printing-PMCPPC-FoD-Package*.mum" goto :eof
mkdir bin\temp\pmcppc %_Nul3%
for /f %%# in ('dir /b /a:-d "!_UUP!\*Microsoft-Windows-Printing-PMCPPC-FoD-Package*.*"') do (
if /i "%%~x#"==".cab" (expand.exe -f:* "!_UUP!\%%#" bin\temp\pmcppc\ %_Nul3%) else (wimlib-imagex.exe apply "!_UUP!\%%#" 1 bin\temp\pmcppc\ --no-acls --no-attributes %_Nul3%)
)
7z.exe e "%_www%" -o.\bin\temp\pmcppc %1\Windows\servicing\Packages\Microsoft-Windows-Printing-PMCPPC-FoD-Package~%_Pkt%~*~%langid%~*.* %1\Windows\WinSxS\Manifests\*_microsoft-windows-p..oyment-languagepack_*.manifest %1\Windows\WinSxS\Manifests\*_microsoft-windows-p..ui-pmcppc.resources_*.manifest %_Nul3%
for /f %%# in ('dir /b /a:-d "bin\temp\pmcppc\*_microsoft-windows-p..ui-pmcppc.resources_*.manifest"') do (
7z.exe e "%_www%" -o.\bin\temp\pmcppc\%%~n# %1\Windows\WinSxS\%%~n#\* %_Nul3%
)
mkdir bin\temp\sxs %_Nul3%
for /f %%a in ('dir /b /a:-d "bin\temp\pmcppc\*.manifest"') do SxSExpand.exe "!_work!\bin\temp\pmcppc\%%a" "bin\temp\sxs\%%a" %_Nul3%
if exist "bin\temp\sxs\*.manifest" move /y "bin\temp\sxs\*" "bin\temp\pmcppc\" %_Nul1%
rmdir /s /q bin\temp\sxs\
goto :eof
:pmcppcwim
for /f %%# in ('dir /b /a:-d "bin\temp\pmcppc\Microsoft-Windows-Printing-PMCPPC-FoD-Package~%_Pkt%~*~~*.mum" %_Nul6%') do (
%_dism2%:"!_cabdir!" /Image:"%_mount%" /LogPath:"%_dLog%\PMCPPC_FoD.log" /Add-Package /PackagePath:"bin\temp\pmcppc\%%#" %_Nul3%
)
for /f %%# in ('dir /b /a:-d "bin\temp\pmcppc\Microsoft-Windows-Printing-PMCPPC-FoD-Package~%_Pkt%~*~%langid%~*.mum" %_Nul6%') do (
%_dism2%:"!_cabdir!" /Image:"%_mount%" /LogPath:"%_dLog%\PMCPPC_FoD.log" /Add-Package /PackagePath:"bin\temp\pmcppc\%%#" %_Nul3%
)
goto :eof
:cleanup
set savc=0&set savr=1
if %_build% geq 18362 (set savc=3&set savr=3)
@ -3103,7 +3212,13 @@ if /i %xOS%==x86 if /i not %arch%==x86 move /y "%mumtarget%\Windows\System32\Con @@ -3103,7 +3212,13 @@ if /i %xOS%==x86 if /i not %arch%==x86 move /y "%mumtarget%\Windows\System32\Con
%_Nul3% offlinereg.exe "%mumtarget%\Windows\System32\Config\SOFTWARE" %_SxsCfg% setvalue SupersededActions 3 4
if exist "%mumtarget%\Windows\System32\Config\SOFTWARE.new" del /f /q "%mumtarget%\Windows\System32\Config\SOFTWARE"&ren "%mumtarget%\Windows\System32\Config\SOFTWARE.new" SOFTWARE
)
%_dism2%:"!_cabdir!" %dismtarget% /Cleanup-Image /StartComponentCleanup
set "_Nul8="
if %_build% geq 25380 (
set "_Nul8=1>nul 2>nul"
echo.
echo Running DISM Cleaning . . .
)
%_dism2%:"!_cabdir!" %dismtarget% /Cleanup-Image /StartComponentCleanup %_Nul8%
if %ResetBase% neq 0 %_dism2%:"!_cabdir!" %dismtarget% /Cleanup-Image /StartComponentCleanup /ResetBase %_Null%
call :cleanmanual&goto :eof
@ -3414,7 +3529,7 @@ if exist "%_mount%\" rmdir /s /q "%_mount%\" @@ -3414,7 +3529,7 @@ if exist "%_mount%\" rmdir /s /q "%_mount%\"
if not exist "%_mount%\" mkdir "%_mount%"
set _www=%~1
for %%# in (eHome,eHomN,eProf,eProN,uProf,uProN,_upgr) do set %%#=0
if %imgcount% gtr 1 set _upgr=1
if %imgcount% gtr 1 if %DisableUpdatingUpgrade% equ 0 set _upgr=1
for /L %%# in (1,1,%imgcount%) do imagex /info "%_www%" %%# >bin\info%%#.txt 2>&1
if %_upgr% equ 1 for /L %%# in (1,1,%imgcount%) do (
if not defined iHome (find /i "Core</EDITIONID>" bin\info%%#.txt %_Nul3% && (set eHome=1&set iHome=%%#))
@ -3427,10 +3542,12 @@ if %eProf% equ 1 if %eHome% equ 1 set uProf=1 @@ -3427,10 +3542,12 @@ if %eProf% equ 1 if %eHome% equ 1 set uProf=1
if %eProN% equ 1 if %eHomN% equ 1 set uProN=1
rem editions deleted in reverse order
if %uProN% equ 1 (
if %_pmcppc% equ 1 call :pmcppcpro %iProN%
set /a imgcount-=1
%_dism1% /Delete-Image /ImageFile:"%_www%" /Index:%iProN% %_Nul3%
)
if %uProf% equ 1 (
if %_pmcppc% equ 1 call :pmcppcpro %iProf%
set /a imgcount-=1
%_dism1% /Delete-Image /ImageFile:"%_www%" /Index:%iProf% %_Nul3%
)
@ -3489,6 +3606,7 @@ goto :eof @@ -3489,6 +3606,7 @@ goto :eof
echo.
echo Adding Apps . . .
call :appx_wim
if %_upgr% equ 1 if %_pmcppc% equ 1 if not exist "%_mount%\Windows\Servicing\Packages\Microsoft-Windows-Printing-PMCPPC-FoD-Package*.mum" call :pmcppcwim
%_dism2%:"!_cabdir!" /Unmount-Wim /MountDir:"%_mount%" /Commit
if !errorlevel! neq 0 (
%_dism1% /Image:"%_mount%" /Get-Packages %_Null%
@ -3516,6 +3634,7 @@ if %wim2swm% equ 0 (start /i "" !_ComSpec! /c "create_virtual_editions.cmd manuw @@ -3516,6 +3634,7 @@ if %wim2swm% equ 0 (start /i "" !_ComSpec! /c "create_virtual_editions.cmd manuw
start /i "" !_ComSpec! /c "create_virtual_editions.cmd manuesd %_label% %isotime%"
)
if exist temp\ rmdir /s /q temp\
if exist bin\expand.exe if not exist bin\dpx.dll del /f /q bin\expand.exe
popd
echo.
echo %line%
@ -3573,6 +3692,7 @@ echo.&echo Errors were reported during ISO creation.&echo.&goto :QUIT @@ -3573,6 +3692,7 @@ echo.&echo Errors were reported during ISO creation.&echo.&goto :QUIT
if exist ISOFOLDER\ rmdir /s /q ISOFOLDER\
if exist bin\temp\ rmdir /s /q bin\temp\
if exist temp\ rmdir /s /q temp\
if exist bin\expand.exe if not exist bin\dpx.dll del /f /q bin\expand.exe
popd
if defined tmpcmp (
for %%# in (%tmpcmp%) do del /f /q "!_UUP!\%%~#" %_Nul3%

Loading…
Cancel
Save