Before I had added this key in ToolKit's removal but removed it later as it's works separately using mrt.exe. Will be adding it back if you want.
@MSMG Has something recently changed that would cause the image sizes to drastically increase in size? Using the same 19043.1237 images, these are the changes I have seen:- x86 image has increased from around 2.3GB to around 2.9GB x64 image has increased from around 3.3GB to around 4.1GB. Could be either the updated Toolkit.cmd or ToolKitHelper.exe? Is it possible to upload a previous version of ToolKitHelper.exe to test?
If you want to use 19043.1237 then use the v11.8 + newer Toolkit.cmd. and then use the newer ToolKitHelper to remove just the Widgets app.
It's part of MicrosoftWindows.Client.CBS_cw5n1h2txyewy, removing the MicrosoftWindows.Client.CBS_cw5n1h2txyewy will break many things, however you can remove the shortcut or the the app from listing in start menu by modifying the AppxManifest.xml but this will break the SFC.
for /f "tokens=3 delims= " %%k in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "DisplayVersion" ^| find "REG_SZ"') do (set HostDisplayVersion=%%k) DisplayVersion not exist for leq build 18363. Only CurrentVersion, but return "6.3" value. for hostlanguage could be... from dism for /f "tokens=6 delims= " %%o in ('DISM /Online /English /Get-Intl ^| findstr /i /C:"Default system UI language"') do (set HostLanguage=%%o) to reg query too for /f "tokens=3 delims= " %%o in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\CommonGlobUserSettings\Control Panel\International" /v "LocaleName" ^| find "REG_SZ"') do (set "HostLanguage=%%o") from Code: :: Setting Windows Media Feature Pack folder path according to selected Source OS if "%SelectedSourceOS%" neq "w10" set "MediaFeaturePack=%MediaFeaturePack%\%SelectedSourceOS%" if "%SelectedSourceOS%" neq "w7" if "%SelectedSourceOS%" neq "w81" set "MediaFeaturePack=%MediaFeaturePack%\%SelectedSourceOS%\%PackageVersion%" to Code: :: Setting Windows Media Feature Pack folder path according to selected Source OS if "%SelectedSourceOS%" neq "w10" if "%SelectedSourceOS%" neq "w11" set "MediaFeaturePack=%MediaFeaturePack%\%SelectedSourceOS%" if "%SelectedSourceOS%" neq "w7" if "%SelectedSourceOS%" neq "w81" set "MediaFeaturePack=%MediaFeaturePack%\%SelectedSourceOS%\%PackageVersion%" :IntPortableDevices session need this condition: Code: :: Checking whether exists N Editions supported for Portable Devices Integration are selected as source. set /A ImageEditionCount=0 for /d %%j in (StarterN, StarterKN, HomeBasicN, HomeBasicKN, CoreN, CloudN, ProessionalN, ProfessionalKN, ProfessionalEducationN, ProfessionalEducationKN, EnterpriseN, EnterpriseKN, EnterpriseSN, EnterpriseGN, UltimateN, UltimateKN, EducationN, EducationKN) do ( if "%ImageEdition%" equ "%%j" set /A ImageEditionCount+=1 ) if %ImageEditionCount% equ 0 ( echo.No N Edition was found. And, Non-N Editions are not supported. echo. goto :Stop ) In :ExportMetroAppsAssociation session Both "goto :Stop" are breaking the loop to other indexes. Just removing both "goto :Stop", the code runs correctly, when there is no Metro Apps Association it follows to the next index correctly. I think this can be helpful when we work with an image with personalized indexes in different ways. optimize with replace all from Code: if "%ImageArchitecture%" equ "x86" ( Reg delete "HKLM\TK_SOFTWARE\Microsoft\Windows NT\CurrentVersion\drivers.desc" /f >nul 2>&1 Reg add "HKLM\TK_SOFTWARE\Microsoft\Windows NT\CurrentVersion\drivers.desc" /v "%%SystemRoot%%\System32\l3codecp.acm" /t REG_SZ /d "Fraunhofer IIS MPEG Layer-3 Codec (Professional)" /f >nul Reg add "HKLM\TK_SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32" /v "msacm.l3acm" /t REG_EXPAND_SZ /d "%%SystemRoot%%\System32\l3codecp.acm" /f >nul ) if "%ImageArchitecture%" equ "x64" ( Reg delete "HKLM\TK_SOFTWARE\Microsoft\Windows NT\CurrentVersion\drivers.desc" /f >nul 2>&1 Reg add "HKLM\TK_SOFTWARE\Microsoft\Windows NT\CurrentVersion\drivers.desc" /v "%%SystemRoot%%\System32\l3codecp.acm" /t REG_SZ /d "Fraunhofer IIS MPEG Layer-3 Codec (Professional)" /f >nul Reg add "HKLM\TK_SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32" /v "msacm.l3acm" /t REG_EXPAND_SZ /d "%%SystemRoot%%\System32\l3codecp.acm" /f >nul Reg delete "HKLM\TK_SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\drivers.desc" /f >nul 2>&1 Reg add "HKLM\TK_SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\drivers.desc" /v "%%SystemRoot%%\SysWOW64\l3codecp.acm" /t REG_SZ /d "Fraunhofer IIS MPEG Layer-3 Codec (Professional)" /f >nul Reg add "HKLM\TK_SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\Drivers32" /v "msacm.l3acm" /t REG_EXPAND_SZ /d "%%SystemRoot%%\SysWOW64\l3codecp.acm" /f >nul ) to Code: if "%Tweak%" equ "EnableFMP3ProCodec" ( Reg delete "HKLM\TK_SOFTWARE\Microsoft\Windows NT\CurrentVersion\drivers.desc" /f >nul 2>&1 Reg add "HKLM\TK_SOFTWARE\Microsoft\Windows NT\CurrentVersion\drivers.desc" /v "%%SystemRoot%%\System32\l3codecp.acm" /t REG_SZ /d "Fraunhofer IIS MPEG Layer-3 Codec (Professional)" /f >nul Reg add "HKLM\TK_SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32" /v "msacm.l3acm" /t REG_EXPAND_SZ /d "%%SystemRoot%%\System32\l3codecp.acm" /f >nul if "%ImageArchitecture%" equ "x64" ( Reg delete "HKLM\TK_SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\drivers.desc" /f >nul 2>&1 Reg add "HKLM\TK_SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\drivers.desc" /v "%%SystemRoot%%\SysWOW64\l3codecp.acm" /t REG_SZ /d "Fraunhofer IIS MPEG Layer-3 Codec (Professional)" /f >nul Reg add "HKLM\TK_SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\Drivers32" /v "msacm.l3acm" /t REG_EXPAND_SZ /d "%%SystemRoot%%\SysWOW64\l3codecp.acm" /f >nul ) ) Replace all from selectedSourceOS to SelectedSourceOS Considering that this is determined at the beginning of the code and is unchanging. Maybe all should be replaced from !DefaultIndexNo! to %DefaultIndexNo% to