[ARCHIVED] Windows Editions Reconstruction Project

Discussion in 'Windows 10' started by whatever127, Jan 10, 2020.

Thread Status:
Not open for further replies.
  1. Yarrak31

    Yarrak31 MDL Senior Member

    Feb 28, 2024
    419
    112
    10
    @zwl29107 where are you, what is the situation, would you share a new lcu or script?
     
  2. Yarrak31

    Yarrak31 MDL Senior Member

    Feb 28, 2024
    419
    112
    10
    The install.wim size is too large, around 6 GB, how can I reduce it? @xinso
     
  3. xinso

    xinso MDL Guru

    Mar 5, 2009
    13,904
    14,620
    340
    #16703 xinso, Jun 29, 2024
    Last edited: Jun 29, 2024
    Compress wim to esd, because 25398.1 "Resetbase" can not completely clean up updated components.
     
  4. Yarrak31

    Yarrak31 MDL Senior Member

    Feb 28, 2024
    419
    112
    10
    With which tool or dism command?
     
  5. haris_mdlf69

    haris_mdlf69 MDL Addicted

    Oct 23, 2018
    599
    1,050
    30
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Yarrak31

    Yarrak31 MDL Senior Member

    Feb 28, 2024
    419
    112
    10
    When I first joined this forum, I didn't know anything. I only entered with basic information. Thanks to you, I can create most ltsc versions.
    Thanks for
    @xinso
    @haris_mdlf69 and other friends
     
  7. xinso

    xinso MDL Guru

    Mar 5, 2009
    13,904
    14,620
    340
  8. kibkalo

    kibkalo MDL Expert

    Sep 8, 2009
    1,025
    365
    60
    #16708 kibkalo, Jun 29, 2024
    Last edited: Jun 29, 2024
    Master xinso, have a question about 19041 Enterprise G.
    Wanted to install it on a VM. Got your old script enterpriseg_19041_x64 - and successfully created install.wim and ISO.
    Everything works fine. Updates are installed fine too.
    But if I tried installing updates (19045.4598) to install.wim with W10UI, I get an error during installation from updated image: "Windows could not set the offline locale information 0x807c0000" - on last minutes of installation.
    Can you guide me please, what to change in WIM file?
     
  9. liliactr

    liliactr MDL Addicted

    Sep 3, 2009
    646
    247
    30
    If you learned well can you teach us too :)

    I have read every 836 page but i have no idea what is going in here. Just dism successfull logs. Nobody shares what commands or batches he used or a how to guide
     
  10. Yarrak31

    Yarrak31 MDL Senior Member

    Feb 28, 2024
    419
    112
    10
    Of course, which version do you want?
     
  11. liliactr

    liliactr MDL Addicted

    Sep 3, 2009
    646
    247
    30
    Does not matter. Birader. Windows 11 Enterprise N LTSC maybe
     
  12. Sum_Ting_Wong

    Sum_Ting_Wong MDL Member

    Jan 30, 2024
    164
    233
    10
    #16713 Sum_Ting_Wong, Jun 29, 2024
    Last edited: Jun 29, 2024
    Probably the latest vc or .net 7/8, not sure. The official release doesn't come with all those .dll files which might bypass the need for some dependency. Or I just don't understand it all yet. Didn't get to porting my workstation yet. That's today's plan again.


    I was reading about applying product policy from GN to G, as GN's policy is less restrictive to a degree. The post was talking about using a GN license file, too, to keep SPP happy; I think. This allowed updates. Of course it would be nice to just have a GN updater that made windows apply most updates for G to GN, or used EnterpriseS/SN if that didn't work out. Perhaps...a way to trick GN to think it's a virtual edition and gets mapped to another.
     
  13. xinso

    xinso MDL Guru

    Mar 5, 2009
    13,904
    14,620
    340
  14. kibkalo

    kibkalo MDL Expert

    Sep 8, 2009
    1,025
    365
    60
    I used English 19041.1 for reconstruction, - and it works perfectly.
    Problem appeared if I updated image with all updates via W10UI.
    I have tried few different images.
    Can be a problem with 19045.4598?
    List of updates, I use with W10UI is:
    Code:
    defender-dism-rc-x64.cab
    SSU-19041.4585-x64.cab
    windows10.0-kb5007401-x64.cab
    Windows10.0-KB5011048-x64-NDP481-Base.cab
    windows10.0-kb5015684-x64_Enablement.cab
    windows10.0-kb5020683-x64-OOBE.cab
    windows10.0-kb5026037-x64_OOBE_update.cab
    windows10.0-kb5032906-x64_DU-Sources.cab
    windows10.0-kb5034232-x64_DU-SafeOS.cab
    Windows10.0-KB5039299-x64_inout.cab
    windows10.0-kb5039299-x64_LCU-4598.cab
    Windows10.0-KB5039336-x64.cab
    windows10.0-kb5039865-x64-ndp481_9251.1.cab
    Once again - original 19041.1 works well, problem appears only if I integrate updates prior to installation.
    looking for your advice.
    Thanks!
     
  15. Sum_Ting_Wong

    Sum_Ting_Wong MDL Member

    Jan 30, 2024
    164
    233
    10
    #16716 Sum_Ting_Wong, Jun 29, 2024
    Last edited: Jul 11, 2024
    Updated the script in that post to properly handle the registry entry, a % was left out.

    But. Here is the full update. It should now be capable of detecting the presence of an update.mum file and asking if you want to use or ignore it. It will now also handle offline images, including mounting a specified file. Should an offline image be processed, it will ask if you wish to save, discard, or leave as-is the mounted image. Additional error handling included as well.

    Code:
    :: YourMUM.bat v0.9 - Installer for .mum files, for online or offline images.
    :: Handles folders with and without update.mum, giving choice to only use or ignore update.mum.
    :: Handles the process of mounting, saving, discarding, or leaving as-is a mounted image
    
    @echo off
    setlocal enabledelayedexpansion
    
    :: Request admin rights if not already running as admin
    >nul 2>&1 reg query "HKU\S-1-5-19\Environment"
    if '%errorlevel%' NEQ '0' (
       (echo.Set UAC = CreateObject^("Shell.Application"^)&echo.UAC.ShellExecute "%~s0", "", "", "runas", 1)>"%tmp%\getadmin.vbs"
       "%tmp%\getadmin.vbs"
       exit /B
    ) else ( >nul 2>&1 del "%tmp%\getadmin.vbs" )
    
    Title .mum installer
    color 0E
    
    :menu
    :: Erase all variables set using blank /set commands, except %mounted%
    set choice=
    set errorlevel=
    set installTarget=
    set targetChoice=
    set offlineLocation=
    set offlineDir=
    set wimFile=
    set mountLocation=
    set mumDir=
    set upmumpath=
    set updateChoice=
    set handling=
    :: Starting...
    call :banner
    echo Please select an option:
    echo 1. Install .mum files from a directory
    echo 2. Install registry entries for .mum files
    echo 3. Uninstall registry entries for .mum files
    echo 4. Exit
    echo.
    set /p choice="Enter your choice: "
    
    if "%choice%"=="1" goto :chooseInstallationTarget
    if "%choice%"=="2" goto :installRegistryEntries
    if "%choice%"=="3" goto :uninstallRegistryEntries
    if "%choice%"=="4" goto :exit
    
    echo Invalid choice. Please try again.
    timeout /t 3 /nobreak >nul
    goto :menu
    
    :installRegistryEntries
    call :banner
    reg add "HKEY_CLASSES_ROOT\SystemFileAssociations\.mum\shell\RunAs" /ve /d "Install with DISM" /f
    reg add "HKEY_CLASSES_ROOT\SystemFileAssociations\.mum\shell\RunAs" /v "HasLUAShield" /t REG_SZ /d "" /f
    reg add "HKEY_CLASSES_ROOT\SystemFileAssociations\.mum\shell\RunAs\command" /ve /d "cmd /k dism /online /add-package /packagepath:\"%%1\"" /f
    echo Registry entries for .mum files installed.
    timeout /t 3 /nobreak >nul
    goto :menu
    
    :uninstallRegistryEntries
    call :banner
    reg delete "HKEY_CLASSES_ROOT\SystemFileAssociations\.mum\shell\RunAs" /f
    echo Registry entries for .mum files uninstalled.
    timeout /t 3 /nobreak >nul
    goto :menu
    
    :chooseInstallationTarget
    call :banner
    echo Please select an installation target:
    echo 1. Current installation
    echo 2. Offline image or installation
    echo.
    set /p targetChoice="Enter your choice: "
    
    if "%targetChoice%"=="1" (
       set installTarget=current
       goto :chooseDirectory
    )
    if "%targetChoice%"=="2" (
       goto :chooseOfflineLocation
    )
    
    echo Invalid choice. Please try again.
    timeout /t 3 /nobreak >nul
    goto :chooseInstallationTarget
    
    :chooseOfflineLocation
    call :banner
    echo Specify the location of the offline files,
    echo  or type "none" if there are currently none:
    set /p offlineLocation="Location: "
    
    if "%offlineLocation%"=="none" (
       set mounted=yes
       goto :chooseWimFile
    ) else (
       set mounted=
       set offlineDir=%offlineLocation%
       goto :chooseDirectory
    )
    
    :chooseWimFile
    call :banner
    echo Please specify the location of the .wim file:
    set /p wimFile="Location: "
    
    if not exist "%wimFile%" (
       echo The specified .wim file does not exist.
       timeout /t 3 /nobreak >nul
       goto :chooseWimFile
    )
    
    :chooseMountLocation
    call :banner
    echo Please specify the mount location:
    set /p mountLocation="Location: "
    
    if not exist "%mountLocation%" (
       echo The specified mount directory does not exist. Creating it...
       mkdir "%mountLocation%"
       if not exist "%mountLocation%" (
           echo Failed to create the mount directory.
           timeout /t 3 /nobreak >nul
           goto :chooseMountLocation
       )
    )
    
    echo Mounting image...
    dism /mount-image /imagefile:"%wimFile%" /mountdir:"%mountLocation%"
    if errorlevel 1 (
       echo Failed to mount the image.
       timeout /t 3 /nobreak >nul
       goto :chooseWimFile
    )
    
    set offlineDir=%mountLocation%
    goto :chooseDirectory
    
    :chooseDirectory
    call :banner
    :: Resets upmumpath variable to ensure it doesn't carry over from a previous run
    set upmumpath=
    echo Please specify the directory containing the .mum files:
    set /p mumDir="Location: "
    
    if not exist "%mumDir%" (
       echo The specified directory does not exist.
       timeout /t 3 /nobreak >nul
       goto :chooseDirectory
    )
    
    goto :checkUpdateMum
    
    :checkUpdateMum
    if exist "%mumDir%\update.mum" (
       set upmumpath=%mumDir%\update.mum
       goto :handleUpdateMum
    ) else (
       goto :installMumFiles
    )
    
    :handleUpdateMum
    call :banner
    echo An update.mum file was found. Please choose an option:
    echo 1. Use update.mum, ignoring other .mums
    echo 2. Use other mums, ignoring update.mum
    echo.
    set /p updateChoice="Enter your choice: "
    
    if "%updateChoice%"=="1" (
       goto :installUpdateMum
    ) else if "%updateChoice%"=="2" (
       goto :installMumFiles
    ) else (
       echo Invalid choice. Please try again.
       timeout /t 3 /nobreak >nul
       goto :handleUpdateMum
    )
    
    :installUpdateMum
    call :banner
    echo Installing update.mum...
    if "%installTarget%"=="current" (
       dism /online /add-package /packagepath:"%upmumpath%"
    ) else (
       dism /image:"%offlineDir%" /add-package /packagepath:"%upmumpath%"
    )
    if errorlevel 1 (
       echo Failed to install update.mum
       echo Failed to install update.mum >> installation_errors.log
    ) else (
       echo Successfully installed update.mum
       echo Successfully installed update.mum >> installation_success.log
    )
    
    echo.
    echo.
    echo Installation complete...
    echo Check installation_success.log and installation_errors.log for details.
    timeout /t 5 /nobreak >nul
    goto :handle
    
    :installMumFiles
    call :banner
    echo Installing .mum files...
    for %%f in ("%mumDir%\*.mum") do (
       if "%%f" neq "%upmumpath%" (
           if "%installTarget%"=="current" (
               dism /online /add-package /packagepath:"%%f"
           ) else (
               dism /image:"%offlineDir%" /add-package /packagepath:"%%f"
           )
           if errorlevel 1 (
               echo Failed to install %%f
               echo Failed to install %%f >> installation_errors.log
           ) else (
               echo Successfully installed %%f
               echo Successfully installed %%f >> installation_success.log
           )
       )
    )
    
    echo.
    echo.
    echo Installation complete...
    echo Check installation_success.log and installation_errors.log for details.
    timeout /t 5 /nobreak >nul
    goto :handle
    
    :handle
    :: Checks if mounted or using a disk image. Wont work if an image was mounted before running the script.
    if "%mounted%"=="yes" (
       goto handlemount
    ) else (
       goto handleoffline
    )
    
    :handlemount
    :: Decides what happens to the mounted path
    call :banner
    echo Now about the image? (if unsure, check generated .txt files)
    echo 1. Save
    echo 2. Discard
    echo 3. Add more
    echo 4. Ignore
    echo.
    set /p handling="Enter your choice: "
    
    if "%handling%"=="1" (
       echo Saving changes...
       dism /unmount-image /mountdir:"%offlineDir%" /commit
       if errorlevel 1 (
           echo Failed to save changes.
           echo Failed to save changes >> installation_errors.log
       ) else (
           set mounted=
           echo Changes saved successfully.
           echo Changes saved successfully >> installation_success.log
       )
    ) else if "%handling%"=="2" (
       echo Discarding changes...
       dism /unmount-image /mountdir:"%offlineDir%" /discard
       if errorlevel 1 (
           echo Failed to discard changes.
           echo Failed to discard changes >> installation_errors.log
       ) else (
           set mounted=
           echo Changes discarded successfully.
           echo Changes discarded successfully >> installation_success.log
       )
    ) else if "%handling%"=="3" (
       echo Continuing without unmounting...
       call :chooseDirectory
    ) else if "%handling%"=="4" (
       echo Resetting variables, returning to start...
       goto :menu
    ) else (
       echo Invalid choice. Please try again.
       timeout /t 3 /nobreak >nul
       goto :handleoffline
    )
    
    :handleoffline
    call :banner
    :: Decides what happens to the offline path
    set handling=
    echo Now about the image? (if unsure, check generated .txt files)
    echo 1. Save {disabled}
    echo 2. Discard {disabled}
    echo 3. Add more
    echo 4. Ignore
    echo.
    set /p handling="Enter your choice: "
    
    if "%handling%"=="3" (
       echo Continuing without unmounting...
       call :chooseDirectory
    ) else if "%handling%"=="4" (
       echo Resetting variables, returning to start...
       goto :menu
    ) else (
       echo Invalid choice. Please try again.
       timeout /t 3 /nobreak >nul
       goto :handlemount
    )
    
    ::-------special-functions-----------
    
    :exit
    :: Creates a countdown for aesthetics
    set "lines=echo. && echo."
    set "cnt=echo COUNTDOWN"
     > %tmp%\Rest1.vbs echo Wscript.sleep 1000 && SET R1=Start /w %tmp%\Rest1.vbs
    cls
    %lines% && echo ">---> Closing in ...3" && %cnt% 3 >> %tmp%\count.txt &&  %R1% && cls
    %lines% && echo ">---> Closing in ....2" && %cnt% 2 >> %tmp%\count.txt &&  %R1% && color 06 && cls
    %lines% && echo ">---> Closing in .....1" && %cnt% 1 >> %tmp%\count.txt &&  %R1% && cls
    del %tmp%\Rest1.vbs > nul && DEL %tmp%\count.txt > nul && exit
    
    
    :banner
    :: Header, also clears clutter
    cls
    echo.
    echo   ___________________________________________________
    echo.                                            
    echo    /\_/\  ___   _   _  _ __    /\/\   /\ /\   /\/\
    echo    \_ _/ / _ \ ^| ^| ^| ^|^| '__^|  /    \ / / \ \ /    \
    echo     / \ ^| (_) ^|^| ^|_^| ^|^| ^|    / /\/\ \\ \_/ // /\/\ \
    echo     \_/  \___/  \__,_^|^|_^|    \/    \/ \___/ \/    \/
    echo.
    echo   ___________________________________________________
    echo.
    echo.
    goto :eof
    
    ::githubgist
    
    Best use case is probably adding packages to offline images, or restoring missing sources. No error handing for instances where a .mum needs another .mum installed first. Perhaps rerunning the folder until errors resolve would work for now. Might be capable of being utilized for unofficial update packs. No function added to ignore applicability but that's an easy edit for those who need.

    Edit: 7/11/24: Working as intended.
     
  16. xinso

    xinso MDL Guru

    Mar 5, 2009
    13,904
    14,620
    340
    #16717 xinso, Jun 29, 2024
    Last edited: Jun 30, 2024
    I am not able to answer the same question of yours for the following reasons:
    1. I don't have the old 19041.1 script of mine you mentioned. I cannot test it.
    2. I don't know about the 3rd-party tool.
     
  17. xxxjdlk29

    xxxjdlk29 MDL Novice

    Jun 7, 2024
    1
    0
    0
    Is there any way to change Installation ID?
     
  18. xinso

    xinso MDL Guru

    Mar 5, 2009
    13,904
    14,620
    340
  19. xinso

    xinso MDL Guru

    Mar 5, 2009
    13,904
    14,620
    340
    #16720 xinso, Jun 30, 2024
    Last edited: Jun 30, 2024