I was able to make 19045.4598 work, replacing standard CAB for Baseless CAB+PSF Still don't understand where I was wrong creating 19041.1 image.
Master, tell me your opinion, - how difficult is to fool OS with the language of language pack? I mean, - now we have a working en-us G, and can add only zh-cn LP. Can we modify update.mum - combining it of two languages, so the header remains zh-cn and OS thinks it is native Chinese language pack, but inside it would use children subpackages of other language? Possible? How difficult? Thanks!
It should. Spoiler (or if not available) (after entering info after above photo) However it seems that the ability to choose what type of directory the mums are coming from is not functioning. One moment.
@liliactr I hope I finally have all functions in working order and more clearly explained. A lot has been rewritten/optimized. There is currently no logic for save/discard if you already mounted an image before running the script. I will add that in v1.0 when I have time. I'm way behind on work. I have tested most functions in various configurations, including mounting via "none," returning to menu, then entering the mounted dir again, to make sure the function for not disabling save/discard works. Spoiler: yourmum.bat v0.9 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
Where can I obtain various versions of Microsoft-Windows-EditionSpecific-EnterpriseS-Package.ESD? Or does it not exist at all and needs to be done in other ways?
@farmsimulator I can only figure file path length was too long. For some reason MSFT in all their "wisdom" hasn't figured out how to properly truncate packages to keep the path under the standard 200-something character limit. amd64_microsoft-windows-s..nt-d-opt-deployment_31bf3856ad364e35_10.0.26100.268_none_3a53503c2ddf7d8d.mum (x64-msft-win-[idkwtf]-d-opt-deploy_10.0.26100.268_none.mum)? Microsoft-DesktopEditions-Layer-Data-VersionInfo-Dynamic-Ge-Beta-Version-EKB-Package~31bf3856ad364e35~amd64~bg-BG~10.0.26100.712.mum (MSFT-DesktEd-Layer-Data-VerInfo-Dyn-Ge-Beta-Ver-EKB-Pak~x64~bg-BG~10.0.26100.712.mum)? @liliactr I think G works like activated without SPP enabled. Can't recall for sure, though, been a few months. I'm sure someone will remind me that causes corruption or something. G is useless, though? I mean it uses the most minimal of resources at stock, but with LTSC essentially here, yeah, probably. GN is less restricted generally, I hear, but it needs modified update packs. Or you run G and somehow use GN's license files (can't recall that method).
Thanks! I am well aware about ProductPolicy - Kernel-MUI-Language-Allowed says "zh-CN;en-US". I am not speaking now about changing policy. I want to understand how it is checked. I can't add other language pack, - I assume it reads the MUM (update.mum or in case of Russian - Microsoft-Windows-Client-LanguagePack-Package~31bf3856ad364e35~amd64~ru-RU~10.0.26100.1.mum) and if it sees Code: <assemblyIdentity name="Microsoft-Windows-Client-LanguagePack-Package" version="10.0.26100.1" processorArchitecture="amd64" language="ru-RU" buildType="release" publicKeyToken="31bf3856ad364e35" / which isn't allowed by PP, I am doomed. So what am I thinking about, is taking the en-US or zh-CN (English preferable to edit, cause most of, Laowai, would prefer that some untranslated parts would remain English, not Chinese) and keeping the header of MUM replace all the child packets for ru-RU. So it thinks, en-US is installed, but binaries are from ru-RU. Is that a bad idea?
Just change product policy. You can install any language pack as it is. I have not try add language pack without changing policy. Does it gives error? i have not edited xrms. Copied some of that was shared here before. Does it need to change i do not know. I do not know if it was edited or not too.
To change ProductPolicy, I need to disable signing, right? Makes me way more vulnerable, What I am looking for, is a system without "Test mode" and changed policy
So, what have I done: 1) Patched EXE as you say to modify SYSTEM for SYSTEK 2) Mounted SYSTEM offline as SYSTEK 3) Exported ControlSet001 registry, edited REG file replacing ControlSet001 for CurrentControlSet, imported it back 4) Loaded previously saved policy file in modified PolicyEditor, and saved to reg (to SYSTEK\CurrentcontrolSet) 5) Exported HKEY_LOCAL_MACHINE\SYSTEK\CurrentControlSet\Control\ProductOptions to REG file, changed CurrentcontrolSet to ControlSet001, imported back. 6) Checked via modified EXE that I have modified attribute 7) Unmounted SYSTEK hive (had some difficulty here, but still have modified data in registry) 8) Booted - no difference, have old policy value