1. Yanta

    Yanta MDL Senior Member

    May 21, 2017
    491
    284
    10
    do as @GreenGremlin suggested. That's all that's needed.

    As to Windows 11 - I wouldn't touch it. It's garbage. I can't help you there.

    But generally speaking, and I don't know your level of expertise here, you can apply updates manually by mounting your install.wim from 24h2/25h2 and then use dism /image /add-package to apply the update if that is all you are doing. Or you could using CodingWonder's DISMTools available at github.
     
  2. imlost2

    imlost2 MDL Member

    Aug 5, 2013
    183
    184
    10
    #27603 imlost2, May 20, 2026
    Last edited: May 25, 2026
    If all you want is updates of Windows 11 24H2 and 25H2 versions, just...[EDIT: save the text below as "UpdateWindows.cmd" and put it in a folder on your PC, along with your Windows .iso iand the helper file "oscdimg.exe", which you can get from inside the MSMG \Bin\x64\ or \Bin\x86 folders. Finally, put your updates in a subfolder names "updates" and execute the "UpdateWindows.cmd" as administsrator to slipstream your Windows updates into your .iso:

    Code:
    @echo off
    setlocal enabledelayedexpansion
    :: Automatically detect the folder where this script is running
    set "WORK=%~dp0"
    if "%WORK:~-1%"=="\" set "WORK=%WORK:~0,-1%"
    :: Look for the first .iso file in the same folder as the script
    set "ISO="
    for %%I in ("%WORK%\*.iso") do (
        set "ISO=%%I"
        set "ISONAME=%%~nI"
        goto :FoundISO
    )
    :FoundISO
    if "%ISO%"=="" (
        echo ERROR: No .iso file found in "%WORK%"
        echo Please place your ISO in this folder and try again.
        pause
        exit /b 1
    )
    :: Define the subfolders dynamically
    set "MOUNT=%WORK%\Mount"
    set "EXTRACT=%WORK%\XISO"
    set "UPDATES=%WORK%\updates"
    set "OUTPUT=%WORK%\%ISONAME%_Updated.iso"
    :: Create the required directories if they don't exist
    mkdir "%MOUNT%" 2>nul
    mkdir "%EXTRACT%" 2>nul
    mkdir "%UPDATES%" 2>nul
    :: ---------------------------------------------------------------
    :: Mount ISO (no .ESD) and wait until the drive letter is available
    :: ---------------------------------------------------------------
    echo Mounting ISO...
    powershell -NoProfile -Command "Mount-DiskImage -ImagePath '%ISO%'"
    echo Waiting for drive letter...
    :WAITDRIVE
    powershell -NoProfile -Command ^
        "$dl = (Get-DiskImage '%ISO%' | Get-Volume).DriveLetter; if (-not $dl) { exit 1 }"
    if errorlevel 1 (
        timeout /t 2 /nobreak >nul
        goto WAITDRIVE
    )
    for /f "usebackq" %%i in (`powershell -NoProfile -Command ^
        "(Get-DiskImage '%ISO%' | Get-Volume).DriveLetter"`) do set DRIVE=%%i:
    echo ISO mounted at %DRIVE%
    :: ---------------------------------------------------------------
    :: Verify install.wim exists before proceeding
    :: ---------------------------------------------------------------
    echo Copying files from ISO...
    xcopy "%DRIVE%\*" "%EXTRACT%\" /E /H /Y
    powershell -NoProfile -Command "Dismount-DiskImage -ImagePath '%ISO%'"
    if not exist "%EXTRACT%\sources\install.wim" (
        echo.
        echo ERROR: install.wim not found in %EXTRACT%\sources\
        echo The copy from the ISO may have failed. Check that xcopy completed without errors.
        pause
        exit /b 1
    )
    :: ---------------------------------------------------------------
    :: Show available indexes
    :: ---------------------------------------------------------------
    echo.
    echo Showing indexes in install.wim...
    dism /Get-WimInfo /WimFile:"%EXTRACT%\sources\install.wim"
    echo.
    set /p INDEX=Enter the index number to service:
    :: ---------------------------------------------------------------
    :: Clean up any leftover mounts from prior runs
    :: ---------------------------------------------------------------
    echo.
    echo Cleaning up stale mounts...
    dism /Cleanup-Wim
    :: ---------------------------------------------------------------
    :: Mount the WIM
    :: ---------------------------------------------------------------
    echo.
    echo Mounting image index %INDEX%...
    dism /Mount-Wim ^
        /WimFile:"%EXTRACT%\sources\install.wim" ^
        /Index:%INDEX% ^
        /MountDir:"%MOUNT%"
    if errorlevel 1 (
        echo ERROR: DISM failed to mount the WIM. Check the DISM log at %%windir%%\Logs\DISM\dism.log
        pause
        exit /b 1
    )
    :: ---------------------------------------------------------------
    :: Apply updates
    :: ---------------------------------------------------------------
    echo.
    echo Applying updates from %UPDATES%...
    for %%f in ("%UPDATES%\*.msu") do (
        echo.
        echo Installing: %%f
        dism /Image:"%MOUNT%" /Add-Package /PackagePath:"%%f"
    )
    :: ---------------------------------------------------------------
    :: Commit and unmount
    :: ---------------------------------------------------------------
    echo.
    echo Committing changes...
    dism /Unmount-Wim /MountDir:"%MOUNT%" /Commit
    if errorlevel 1 (
        echo ERROR: Commit failed. The mount directory may still be active.
        echo Run:  dism /Unmount-Wim /MountDir:"%MOUNT%" /Discard
        pause
        exit /b 1
    )
    :: ---------------------------------------------------------------
    :: Rebuild the ISO
    :: ---------------------------------------------------------------
    echo.
    echo Creating updated ISO...
    "%WORK%\oscdimg.exe" -m -o -u2 -udfver102 ^
        -bootdata:2#p0,e,b"%EXTRACT%\boot\etfsboot.com"#pEF,e,b"%EXTRACT%\efi\microsoft\boot\efisys.bin" ^
        "%EXTRACT%" "%OUTPUT%"
    if errorlevel 1 (
        echo ERROR: oscdimg failed to create the ISO.
        pause
        exit /b 1
    )
    echo.
    echo Done! Output ISO: %OUTPUT%
    pause
    
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. icehacker

    icehacker MDL Novice

    Sep 30, 2011
    5
    9
    0
    Thanks for this
     
  4. imlost2

    imlost2 MDL Member

    Aug 5, 2013
    183
    184
    10
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...