abbodi1406's Batch Scripts Repo

Discussion in 'Scripting' started by abbodi1406, May 4, 2017.

  1. HLP Mr. Lin Yu

    HLP Mr. Lin Yu MDL Member

    Jul 22, 2022
    105
    57
    10
    I'm trying to use W10UI to integrate updates for Windows 10 LTSB 2015 (build 10240).
    I have the SSU (KB5066587) and the LCU (KB5066837). The SSU installs successfully, but the LCU integration always fails with DISM error 0x800f0922.
    I was wondering if this is expected, or am I missing another prerequisite update? Is this version simply not supported by the script?
     

    Attached Files:

  2. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    18,610
    100,025
    340
    See the Notes: spoiler
    https://forums.mydigitallife.net/posts/1216064/
     
  3. HLP Mr. Lin Yu

    HLP Mr. Lin Yu MDL Member

    Jul 22, 2022
    105
    57
    10
    Thank you for the guidance. My apologies, I should have read the notes more carefully. The `0x800f0922` error is resolved after I used the `Fix_SSShim_10240-x64`.
    However, I have a new question. When I use W10UI with the `WU10240.txt` list, the offline integration seems to succeed. `dism /Get-WimInfo` correctly shows the build as **10240.12261**. But after I install the OS from the resulting ISO, `DISM /Online /Get-CurrentEdition` shows the build as **10240.18818**.

    I've run a couple more tests to confirm this:

    1. I encountered the exact same issue when using W10UI with `WU10240.txt` on a running (online) LTSB 2015 system.
    2. I also tried updating a fresh RTM installation to build 10240.12261 using only the standard Windows Update service. The result was the same: `DISM /Online /Get-CurrentEdition` still reported **10240.18818**.

    Is this the expected behavior? Is the build number reported by `/Get-CurrentEdition` supposed to be different from the actual integrated LCU build in this case?

    Apologies for the delay; it took me some time to run these tests.

    螢幕擷取畫面 2025-10-16 234452.png
    螢幕擷取畫面 2025-10-20 211059.png
     
  4. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    18,610
    100,025
    340
    @HLP Mr. Lin Yu
    10240.18818 = DismHost.exe version
    10240.21161 = UBR registry version (LCU version)

    yes, all is expected
     
  5. HLP Mr. Lin Yu

    HLP Mr. Lin Yu MDL Member

    Jul 22, 2022
    105
    57
    10
    I have repeatedly confirmed that with the latest version of W10MUI, 24.8, when processing build 26100, if the Updates folder contains the KB5054156 Enablement Pack, a crash error will occur. If the KB5054156 Enablement Pack is not included, there is no problem.
    The error occurs during the first "Running W10UI v10.55", after "Adding .NET Framework 3.5 feature..." and "Reinstalling cumulative update(s)...", but before "Update winre.wim / amd64".

    ============================================================
    Reinstalling cumulative update(s)...
    ============================================================

    Deployment Image Servicing and Management tool
    Version: 10.0.26100.2454

    Image Version: 10.0.26100.6713

    Processing 1 of 2 - Adding package Package_for_RollupFix31bf3856ad364e35amd6426100.1742.1.10
    [==========================100.0%==========================]
    Processing 2 of 2 - Adding package Package_for_RollupFix31bf3856ad364e35amd6426100.6713.1.16
    [==========================100.0%==========================]
    The operation completed successfully.
    錯誤: 系統找不到指定的登錄機碼或值。
    錯誤: 系統找不到指定的登錄機碼或值。

    translates to "Error: The system cannot find the specified registry key or value."
    It shows two identical errors, and then it crashes.
    If the KB5054156 Enablement Pack is not included, there is no problem.

    Should I provide more information?
     
  6. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    18,610
    100,025
    340
    Can you enable debug mode for W10MUI.cmd and share the log (full or temp)?

    you may use Remove_Failure_MountDir_TempDir.cmd when it crash
     
  7. June's Hill

    June's Hill MDL Member

    Jul 1, 2021
    143
    180
    10
    Dear abbodi1406, thank you very much for this update.

    I have a suggestion for W10MUI. It includes W10UI, but sometimes there are some issues. For example, if a user sets "wim2esd" in W10UI inside W10MUI, it doesn't work.

    Also, the version of W10UI inside W10MUI, gets old because it is not updated like the "independent" W10UI.

    Why not remove all W10UI code and files inside W10MUI, and make a very clear warning that it is recommended to use W10UI (to integrate updates, and make other modifications) after integrate multi-language (W10MUI)???
     
  8. HLP Mr. Lin Yu

    HLP Mr. Lin Yu MDL Member

    Jul 22, 2022
    105
    57
    10
    #3828 HLP Mr. Lin Yu, Oct 22, 2025
    Last edited by a moderator: Oct 22, 2025
    Code:
    ============================================================
    Reinstalling cumulative update(s)...
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.26100.2454
    
    Image Version: 10.0.26200.6713
    
    Processing 1 of 2 - Adding package Package_for_RollupFix~31bf3856ad364e35~amd64~~26100.1742.1.10
    [==========================100.0%==========================]
    Processing 2 of 2 - Adding package Package_for_RollupFix~31bf3856ad364e35~amd64~~26100.6713.1.16
    [==========================100.0%==========================]
    The operation completed successfully.
    
    
    cd /d "!WORKDIR!"
    
    if not defined isomaj for /F "tokens=6,7 delims=_." %a in ('dir /b /a:-d /od "C:\W10MUIMOUNT\install\Windows\WinSxS\Manifests*_microsoft-windows-coreos-revision*.manifest"') do (set isover=%a.%b & set isomaj=%a & set isomin=%b )
    
    (set isover=26100.1742 & set isomaj=26100 & set isomin=1742 )
    
    (set isover=26100.1742 & set isomaj=26100 & set isomin=1742 )
    
    (set isover=26100.6713 & set isomaj=26100 & set isomin=6713 )
    
    (set isover=26100.6713 & set isomaj=26100 & set isomin=6713 )
    
    if not defined isolab (if 26100 GEQ 15063 (call :DetectLab isolab ) else (call :legacyLab isolab ) )
    
    set "_tikey=HKLM\uiSOFTWARE\Microsoft\Windows NT\CurrentVersion\Update\TargetingInfo\Installed"
    
    reg.exe load HKLM\uiSOFTWARE "C:\W10MUIMOUNT\install\Windows\system32\config\SOFTWARE"
    操作順利完成。(The operation completed successfully.)
    
    for /F "tokens=* delims=" %# in ('reg.exe query "HKLM\uiSOFTWARE\Microsoft\Windows NT\CurrentVersion\Update\TargetingInfo\Installed" | findstr /i /r ".*.OS"') do set "_oskey=%#"
    
    set "_oskey=HKEY_LOCAL_MACHINE\uiSOFTWARE\Microsoft\Windows NT\CurrentVersion\Update\TargetingInfo\Installed\Client.OS.rs2.amd64"
    
    set "_oskey=HKEY_LOCAL_MACHINE\uiSOFTWARE\Microsoft\Windows NT\CurrentVersion\Update\TargetingInfo\Installed\Windows.OS.Emergency.CBS.amd64"
    
    for /F "skip=2 tokens=2*" %A in ('reg.exe query "HKEY_LOCAL_MACHINE\uiSOFTWARE\Microsoft\Windows NT\CurrentVersion\Update\TargetingInfo\Installed\Windows.OS.Emergency.CBS.amd64" /v Branch') do set "isolab=%B"
    錯誤: 系統找不到指定的登錄機碼或值。(Error: The system was unable to find the specified registry key or value.)
    
    reg.exe save HKLM\uiSOFTWARE "C:\W10MUIMOUNT\install\Windows\System32\Config\SOFTWARE2"
    操作順利完成。(The operation completed successfully.)
    
    reg.exe unload HKLM\uiSOFTWARE
    操作順利完成。(The operation completed successfully.)
    
    move /y "C:\W10MUIMOUNT\install\Windows\System32\Config\SOFTWARE2" "C:\W10MUIMOUNT\install\Windows\System32\Config\SOFTWARE"
    移動 1 個檔案。(1 file(s) moved.)
    
    goto :eof
    
    if not defined isodate if exist "C:\W10MUIMOUNT\install\Windows\Servicing\Packages\Package_for_RollupFix*.mum" (
    for /F %# in ('dir /b /a:-d /od "C:\W10MUIMOUNT\install\Windows\Servicing\Packages\Package_for_RollupFix*.mum"') do copy /y "C:\W10MUIMOUNT\install\Windows\Servicing\Packages%#" C:\Windows\temp\update.mum
    call :Datemum isodate
    )
    
    copy /y "C:\W10MUIMOUNT\install\Windows\Servicing\Packages\Package_for_RollupFix31bf3856ad364e35amd64~~26100.1742.1.10.mum" C:\Windows\temp\update.mum
    複製了 1 個檔案。(1 file(s) copied.)
    
    copy /y "C:\W10MUIMOUNT\install\Windows\Servicing\Packages\Package_for_RollupFix31bf3856ad364e35amd64~~26100.6713.1.16.mum" C:\Windows\temp\update.mum
    複製了 1 個檔案。(1 file(s) copied.)
    
    set "mumfile=C:\Windows\temp\update.mum"
    
    set "chkfile=!mumfile:=\!"
    
    if 0 EQU 1 for /F "tokens=2 delims==" %# in ('wmic datafile where "name='!chkfile!'" get LastModified /value') do set "mumdate=%#"
    
    if 0 EQU 0 for /F %# in ('powershell -nop -c "([WMI]'CIM_DataFile.Name=''!chkfile!''').LastModified"') do set "mumdate=%#"
    
    set "mumdate=20250910063803.730069+480"
    
    del /f /q C:\Windows\temp*.mum
    
    set "isodate=!mumdate:~2,2!!mumdate:~4,2!!mumdate:~6,2!-!mumdate:~8,4!"
    
    goto :eof
    
    if 0 EQU 0 if exist "C:\W10MUIMOUNT\install\Windows\Servicing\Packages\microsoft-windows-enablement-package~.mum" call :DetectEP
    
    set uupmaj=
    
    set _fixEP=0
    
    set _actEP=1
    
    if exist "C:\W10MUIMOUNT\install\Windows\Servicing\Packages\Microsoft-Windows-1909Enablement-Package~*.mum" set "_fixEP=18363"
    
    if exist "C:\W10MUIMOUNT\install\Windows\Servicing\Packages\Microsoft-Windows-20H2Enablement-Package~*.mum" set "_fixEP=19042"
    
    if exist "C:\W10MUIMOUNT\install\Windows\Servicing\Packages\Microsoft-Windows-21H1Enablement-Package~*.mum" set "_fixEP=19043"
    
    if exist "C:\W10MUIMOUNT\install\Windows\Servicing\Packages\Microsoft-Windows-21H2Enablement-Package~*.mum" set "_fixEP=19044"
    
    if exist "C:\W10MUIMOUNT\install\Windows\Servicing\Packages\Microsoft-Windows-22H2Enablement-Package~*.mum" set "_fixEP=19045"
    
    if exist "C:\W10MUIMOUNT\install\Windows\Servicing\Packages\Microsoft-Windows-ASOSFe22H2Enablement-Package~*.mum" set "_fixEP=20349"
    
    if exist "C:\W10MUIMOUNT\install\Windows\Servicing\Packages\Microsoft-Windows-SV2MomentEnablement-Package~.mum" for /F "tokens=3 delims=-" %a in ('dir /b /a:-d /od "C:\W10MUIMOUNT\install\Windows\Servicing\Packages\Microsoft-Windows-SV2MomentEnablement-Package~.mum"') do (for /F "tokens=3 delims=eEtT" %i in ('echo %a') do (set /a _fixEP=26100+%i ) )
    
    if exist "C:\W10MUIMOUNT\install\Windows\Servicing\Packages\Microsoft-Windows-SV2Moment4Enablement-Package~*.mum" set "_fixEP=22631"
    
    if exist "C:\W10MUIMOUNT\install\Windows\Servicing\Packages\Microsoft-Windows-23H2Enablement-Package~*.mum" set "_fixEP=22631"
    
    if exist "C:\W10MUIMOUNT\install\Windows\Servicing\Packages\Microsoft-Windows-SV2BetaEnablement-Package~*.mum" set "_fixEP=22635"
    
    if exist "C:\W10MUIMOUNT\install\Windows\Servicing\Packages\Microsoft-Windows-Ge-Client-Server-Beta-Version-Enablement-Package~*.mum" set "_fixEP=26120"
    
    if exist "C:\W10MUIMOUNT\install\Windows\Servicing\Packages\Microsoft-Windows-Ge-Client-Server-26200-Version-Enablement-Package~*.mum" set "_fixEP=26200"
    
    if exist "C:\W10MUIMOUNT\install\Windows\Servicing\Packages\Microsoft-Windows-Ge-Client-Server-26220-Version-Enablement-Package~*.mum" set "_fixEP=26220"
    
    set "wnt=31bf3856ad364e35_10"
    
    if exist "C:\W10MUIMOUNT\install\Windows\WinSxS\Manifests*_microsoft-updatetargeting-os_31bf3856ad364e35_11..manifest" set "wnt=31bf3856ad364e35_11"
    
    if exist "C:\W10MUIMOUNT\install\Windows\WinSxS\Manifests*_microsoft-updatetargeting-os_31bf3856ad364e35_12..manifest" set "wnt=31bf3856ad364e35_12"
    
    if exist "C:\W10MUIMOUNT\install\Windows\WinSxS\Manifests*microsoft-updatetargeting-." %I in ('dir /b /a:-d /od "C:\W10MUIMOUNT\install\Windows\WinSxS\Manifests*microsoft-updatetargeting-." %I in ('dir /b /a:-d /od "C:\W10MUIMOUNT\install\Windows\WinSxS\Manifests*_microsoft-updatetargeting-os_31bf3856ad364e35_10.26200.manifest"') do (set uupver=%J.%K & set uupmaj=%J & set uupmin=%K )
    )
    
    (set uupver=26200.6713 & set uupmaj=26200 & set uupmin=6713 )
    
    if not defined uupmaj goto :eof
    
    if not defined uuplab (if defined isolab (set "uuplab=" ) else (call :DetectLab uuplab ) )
    
    set "_tikey=HKLM\uiSOFTWARE\Microsoft\Windows NT\CurrentVersion\Update\TargetingInfo\Installed"
    
    reg.exe load HKLM\uiSOFTWARE "C:\W10MUIMOUNT\install\Windows\system32\config\SOFTWARE"
    操作順利完成。(The operation completed successfully.)
    
    for /F "tokens=* delims=" %# in ('reg.exe query "HKLM\uiSOFTWARE\Microsoft\Windows NT\CurrentVersion\Update\TargetingInfo\Installed" | findstr /i /r ".*.OS"') do set "_oskey=%#"
    
    set "_oskey=HKEY_LOCAL_MACHINE\uiSOFTWARE\Microsoft\Windows NT\CurrentVersion\Update\TargetingInfo\Installed\Client.OS.rs2.amd64"
    
    set "_oskey=HKEY_LOCAL_MACHINE\uiSOFTWARE\Microsoft\Windows NT\CurrentVersion\Update\TargetingInfo\Installed\Windows.OS.Emergency.CBS.amd64"
    
    for /F "skip=2 tokens=2*" %A in ('reg.exe query "HKEY_LOCAL_MACHINE\uiSOFTWARE\Microsoft\Windows NT\CurrentVersion\Update\TargetingInfo\Installed\Windows.OS.Emergency.CBS.amd64" /v Branch') do set "uuplab=%B"
    錯誤: 系統找不到指定的登錄機碼或值。(Error: The system was unable to find the specified registry key or value.)
    
    reg.exe save HKLM\uiSOFTWARE "C:\W10MUIMOUNT\install\Windows\System32\Config\SOFTWARE2"
    操作順利完成。(The operation completed successfully.)
    
    reg.exe unload HKLM\uiSOFTWARE
    操作順利完成。(The operation completed successfully.)
    
    move /y "C:\W10MUIMOUNT\install\Windows\System32\Config\SOFTWARE2" "C:\W10MUIMOUNT\install\Windows\System32\Config\SOFTWARE"
    移動 1 個檔案。(1 file(s) moved.)
    
    goto :eof
    命令語法不正確。(The syntax of the command is incorrect.)
    
    if 26200==18363 if /i "~0,4uuplab:~4
    
     

    Attached Files:

  9. HLP Mr. Lin Yu

    HLP Mr. Lin Yu MDL Member

    Jul 22, 2022
    105
    57
    10
    If I run W10UI by itself, there are no problems and everything goes smoothly.
     
  10. June's Hill

    June's Hill MDL Member

    Jul 1, 2021
    143
    180
    10
    For that reason, to make the whole code clearer and more reliable, I made this suggestion some minutes ago:

     
  11. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    18,610
    100,025
    340
    To reduce time and effort of multiple mount/unmount
     
  12. June's Hill

    June's Hill MDL Member

    Jul 1, 2021
    143
    180
    10
    Great, but W10UI inside W10MUI is a little bit "buggy". For example, the following options don't work properly: "wim2swm", "wim2esd", "SkipEdge", "UpdBootFiles", and a few more.

    The effort of multiple mount/unmount is just copy and pasting the new ISO path. As I said before: I prefer using this route:

    UUPDump -> UUP Converter (just Base Build, that is, 19041.1) -> W10MUI (just add Languages + OnDemand + WinRE Langs) -> W10UI (Updates, .NET, Cleanup, WinRE update)
     
  13. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    18,610
    100,025
    340
    Fixed, thanks
    W10MUI v24.9
     
  14. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    18,610
    100,025
    340
  15. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    18,610
    100,025
    340
    W10UI v10.56f

    - Fixed issue when wimlib-imagex is used to extract files from 26100+ LCU
     
  16. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    18,610
    100,025
    340
  17. BELNN

    BELNN MDL Member

    Apr 2, 2016
    136
    92
    10
    #3837 BELNN, Nov 11, 2025
    Last edited: Nov 11, 2025
    ============================================================
    Running W10UI v10.56r
    ============================================================

    ============================================================
    Configured Options...
    ============================================================

    Net35
    LCUmsuExpand 1
    Cleanup
    ResetBase
    WinRE
    ISO

    ============================================================
    Copying DVD Drive contents to work directory...
    ============================================================

    ============================================================
    Extracting dpx.dll file...
    ============================================================

    ============================================================
    Extracting .cab files from .msu files...
    ============================================================

    1/2: Windows11.0-KB5043080-x64.msu [Combined UUP]
    2/2: Windows11.0-KB5071419-x64.msu [Combined UUP]

    ============================================================
    Extracting files from update containers (cab/wim)...
    *** This will require some disk space, please be patient ***
    ============================================================

    1/8: Windows11.0-KB5066128-x64-NDP481.cab [NetFx]
    2/8: Windows11.0-KB5066383-x64_PSFX.cab [Enablement]
    3/8: Windows11.0-KB5068233-x64_PSFX.cab [SafeOS DU]
    4/8: Windows11.0-KB5069228-x64.cab [Setup DU]
    5/8: Windows11.0-KB5043113-x64_inout.cab [SSU]
    6/8: Windows11.0-KB5067118-x64_inout.cab [SSU]
    7/8: Windows11.0-KB5043080-x64.wim [LCU]
    8/8: Windows11.0-KB5067115-x64.wim [LCU]
    9/8: RCU-26100.7052-x64-KB5071419.cab [RCU]

    ============================================================
    Mounting sources\install.wim - index 1/1
    ============================================================

    Deployment Image Servicing and Management tool
    Version: 10.0.26100.5074

    Mounting image
    [==========================100.0%==========================]
    The operation completed successfully.

    ============================================================
    Checking Updates...
    ============================================================

    ============================================================
    Installing servicing stack update...
    ============================================================

    Deployment Image Servicing and Management tool
    Version: 10.0.26100.5074

    Image Version: 10.0.26100.1

    Processing 1 of 1 - Adding package Package_for_ServicingStack_7050~31bf3856ad364e35~amd64~~26100.7050.1.1
    [==========================100.0%==========================]
    The changes due to package Package_for_ServicingStack_7050 requires the current servicing session to be reloaded.
    All the packages will be processed again.
    The operation completed successfully.

    ============================================================
    Installing updates...
    ============================================================

    Deployment Image Servicing and Management tool
    Version: 10.0.26100.5074

    Image Version: 10.0.26100.1

    Processing 1 of 2 - Adding package Package_for_KB5066383~31bf3856ad364e35~amd64~~26100.6690.1.3
    [==========================100.0%==========================]
    Processing 2 of 2 - Adding package Package_for_DotNetRollup_481~31bf3856ad364e35~amd64~~10.0.9321.3
    [==========================100.0%==========================]
    The operation completed successfully.

    Deployment Image Servicing and Management tool
    Version: 10.0.26100.5074

    Image Version: 10.0.26100.1

    Processing 1 of 1 - Adding package Package_for_RollupFix~31bf3856ad364e35~amd64~~26100.1742.1.10
    [==========================100.0%==========================]
    The operation completed successfully.

    Deployment Image Servicing and Management tool
    Version: 10.0.26100.5074

    Image Version: 10.0.26100.1742

    [==========================100.0%==========================]
    The operation completed successfully.

    Deployment Image Servicing and Management tool
    Version: 10.0.26100.5074

    Image Version: 10.0.26100.1742

    [==========================100.0%==========================]
    The operation completed successfully.

    Deployment Image Servicing and Management tool
    Version: 10.0.26100.5074

    Image Version: 10.0.26100.1742

    Processing 1 of 1 - Adding package Package_for_RollupFix~31bf3856ad364e35~amd64~~26100.7051.1.2
    [==========================100.0%==========================]
    An error occurred - Package_for_RollupFix Error: 0x80070202

    Error: 514

    The target file system block is shared between multiple extents.

    The DISM log file can be found at C:\WINDOWS\Logs\DISM\DismLCU.log

    Deployment Image Servicing and Management tool
    Version: 10.0.26100.5074

    Image Version: 10.0.26100.1742

    [===========================97.3%======================== ]
    The operation completed successfully.

    Deployment Image Servicing and Management tool
    Version: 10.0.26100.5074

    Image Version: 10.0.26100.1742

    [==========================100.0%==========================]
    The operation completed successfully.

    Deployment Image Servicing and Management tool
    Version: 10.0.26100.5074

    Image Version: 10.0.26100.1742

    Processing 1 of 1 - Adding package Package_for_RevisedFix~31bf3856ad364e35~amd64~~26100.7052.1.1
    [==========================100.0%==========================]
    The operation completed successfully.

    01742-Windows11.0-KB5043080-x64.msu

    Deployment Image Servicing and Management tool
    Version: 10.0.26100.5074

    Image Version: 10.0.26100.1742

    Processing 1 of 1 -
    The operation completed successfully.

    07051-Windows11.0-KB5071419-x64.msu

    Deployment Image Servicing and Management tool
    Version: 10.0.26100.5074

    Image Version: 10.0.26100.1742

    Processing 1 of 1 -
    [===========================50.0% ]
     
  18. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    18,610
    100,025
    340
    @BELNN
    Check harddisk for enough free space, or defragmentation
    or Antivirus blocking some files
     
  19. BELNN

    BELNN MDL Member

    Apr 2, 2016
    136
    92
    10
    There is more than enough free space. The antivirus is disabled. The error only occurs with 26220.7052. I checked 26220.7051, 26220.7070 and there are no problems.
     
  20. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    18,610
    100,025
    340
    The error occur while adding 26100.7051.1.2 which is the same as 26220.7051