Ok perfect, but i was wanting to try the new features of 20H2 build Without the enablement package, i can forget about those. I also saw screenshots from you that you achieved a 20H2 build with the toolkit.
@MSMG, For the record, I'm a little confused in this learning ... I'm asking for learning purposes only. You put 2 different command modes ... I suppose the command "ToolKitHelper <Image-Mount-Folder> <Component-Name1; Component-Name2; Component-Name3>" is to be executed outside "Toolkit.cmd" in any other script. Or by direct command line. On the other hand there is this command line below. if "%Component%" equ "WindowsApps" call :RemoveWindowsComponent "%InstallMount%", "All Windows Apps", "WindowsApps" This term "All Windows Apps" calls what part of the code? If I want to implement this codes within the toolkit. How could it be done? I'm thinking about this 2 code modes: In one I use "% ToolkitHelper%" in another I use "call: RemoveWindowsComponent". For the selection I put each Component-Name in just one line. Just the way it is below without using <>. Component-Name1;Component-Name2;Component-Name3 Which of the 2 can work better? Or none of the 2? If none, Am I reasoning right on this point? Or should it be otherwise? What correction should be made? Another question: How do I comment on a line in the "RemovePkgsList.txt" files? Would it be using the "rem" command? Thanks in advance! Edit: From what I have tested now, it seems to work with "call :RemoveWindowsComponent", but it is interrupted and some Components are left behind. in the test with the command "%ToolKitHelper%" it removes everything that was listed and separated by ";". Note: so it removes really, really fast.
thank you for your hard work, can you please advise how to do it manually integrate PowerShell 7.0.2 Pack thanks
For the 20H2 test, I didn't use the cleanup image option, just saved the image and installed it. May be Edge Chromium also needs to be removed to get the image cleanup too work.
ToolKitHelper is the actual removal program and :RemoveWindowsComponent is the function which calls the ToolKitHelper program. In the Remove Windows Components using Package List mode, I'm using the ToolKitHelper directly to indicate the tool to remove components present in the RemovePkgs.txt file. "All Windows Apps" is just description to show within the Toolkit Window. Code: ::------------------------------------------------------------------------------------------- :: Function to remove a Windows Component from the Image using ToolKitHelper.exe :: Input Parameters [ %~1 : Image Mount Path, %~2 : Component Description, %~3 : Component Name ] ::------------------------------------------------------------------------------------------- :RemoveWindowsComponent setlocal set ComponentName= echo.------------------------------------------------------------------------------- echo.Removing %~2 Package... echo.------------------------------------------------------------------------------- %ToolKitHelper% %~1 %~3 echo. :: Unmount Image Registry if Mounted/Abandoned call :UnMountImageRegistry set ComponentName= endlocal goto :eof ::------------------------------------------------------------------------------------------- You can also use the ToolKitHelper directly instead of :RemoveWindowsComponent but you need to create a separate set for each editions/versions since some components don't exist in some editions/versions. This will work Code: if "%ImageIndexNo%" equ "*" ( echo. for /L %%i in (1, 1, %ImageCount%) do ( if not %ImageIndexNo% gtr 9 echo.##########################[Install.wim, Index : %%i]############################# if %ImageIndexNo% gtr 9 echo.##########################[Install.wim, Index : %%i]############################ echo. :: Getting Install Image Index Architecture call :GetImageIndexInfo "%InstallWim%", %%i >nul if "%Component%" equ "CustomSelectionRemovalScript" ( %ToolKitHelper% "%InstallMount%\%%i" AdobeFlashForWindows;FirstLogonAnimation;WindowsMediaPlayer;CEIP_SQM;UnifiedTelemetryClient;WiFiNetworkManager;WindowsInsiderHub;StepsRecorder;ContentDeliveryManager;ECApp;EdgeDevToolsClient;MapControl;OneDrive;RetailDemoContent;SecureAssessmentBrowser;SkypeORTC;BingWeather;FeedbackHub;GetHelp;Getstarted;Maps;Messaging;OfficeHub;OneConnect;SkypeApp;ZuneMusic;ZuneVideo echo. ) ) ) else ( if "%Component%" equ "CustomSelectionRemovalScript" ( %ToolKitHelper% "%InstallMount%" AdobeFlashForWindows;FirstLogonAnimation;WindowsMediaPlayer;CEIP_SQM;UnifiedTelemetryClient;WiFiNetworkManager;WindowsInsiderHub;StepsRecorder;ContentDeliveryManager;ECApp;EdgeDevToolsClient;MapControl;OneDrive;RetailDemoContent;SecureAssessmentBrowser;SkypeORTC;BingWeather;FeedbackHub;GetHelp;Getstarted;Maps;Messaging;OfficeHub;OneConnect;SkypeApp;ZuneMusic;ZuneVideo echo. ) ) You can't comment the lines in the RemovePackages.txt, it's not supported.
1) Run the ToolKit and mount the source image. 2) Open a command prompt using NSudo tool with all privileges enabled and Trusted Installer as user Run the below commands under ToolKit directory. For W10 32-bit image Code: DISM /Apply-Image /ImageFile:Packs\PowerShell7\PowerShell7_w10.tpk /Index:1 /ApplyDir:Mount\Install Reg load HKLM\TK_SOFTWARE "Mount\Install\Windows\System32\config\SOFTWARE" Reg load HKLM\TK_SYSTEM "Mount\Install\Windows\System32\config\SYSTEM" Reg import Packs\PowerShell7\PowerShell7_w10_x86.reg Reg unload HKLM\TK_SOFTWARE Reg unload HKLM\TK_SYSTEM For W10 64-bit image Code: DISM /Apply-Image /ImageFile:Packs\PowerShell7\PowerShell7_w10.tpk /Index:2 /ApplyDir:Mount\Install Reg load HKLM\TK_SOFTWARE "Mount\Install\Windows\System32\config\SOFTWARE" Reg load HKLM\TK_SYSTEM "Mount\Install\Windows\System32\config\SYSTEM" Reg import Packs\PowerShell7\PowerShell7_w10_x64.reg Reg unload HKLM\TK_SOFTWARE Reg unload HKLM\TK_SYSTEM 3) In ToolKit Apply-> Save and Rebuild the image and test it out.
Yes, later I saw the code for ":RemoveWindowsComponents". When you say that some apps are not present in some editions, it doesn't matter much to me. It mattered by the unitary removal mode, since it was very slow. And in this new way, the script will only warn you that such a component no longer exists and will move very quickly to remove the next one. Yes, later I saw the code for ": RemoveWindowsComponents". Do I need to unmount the register by inserting the command "call: UnMountImageRegistry" at the end of the code? Code: if "%ImageIndexNo%" equ "*" ( echo. for /L %%i in (1, 1, %ImageCount%) do ( if not %ImageIndexNo% gtr 9 echo.##########################[Install.wim, Index : %%i]############################# if %ImageIndexNo% gtr 9 echo.##########################[Install.wim, Index : %%i]############################ echo. :: Getting Install Image Index Architecture call :GetImageIndexInfo "%InstallWim%", %%i >nul if "%Component%" equ "CustomSelectionRemovalScript" ( %ToolKitHelper% "%InstallMount%\%%i" AdobeFlashForWindows;FirstLogonAnimation;WindowsMediaPlayer;CEIP_SQM;UnifiedTelemetryClient;WiFiNetworkManager;WindowsInsiderHub;StepsRecorder;ContentDeliveryManager;ECApp;EdgeDevToolsClient;MapControl;OneDrive;RetailDemoContent;SecureAssessmentBrowser;SkypeORTC;BingWeather;FeedbackHub;GetHelp;Getstarted;Maps;Messaging;OfficeHub;OneConnect;SkypeApp;ZuneMusic;ZuneVideo ) ) ) else ( if "%Component%" equ "CustomSelectionRemovalScript" ( %ToolKitHelper% "%InstallMount%" AdobeFlashForWindows;FirstLogonAnimation;WindowsMediaPlayer;CEIP_SQM;UnifiedTelemetryClient;WiFiNetworkManager;WindowsInsiderHub;StepsRecorder;ContentDeliveryManager;ECApp;EdgeDevToolsClient;MapControl;OneDrive;RetailDemoContent;SecureAssessmentBrowser;SkypeORTC;BingWeather;FeedbackHub;GetHelp;Getstarted;Maps;Messaging;OfficeHub;OneConnect;SkypeApp;ZuneMusic;ZuneVideo ) call: UnMountImageRegistry ) The line "echo." it is not necessary before closing the parenthesis. I removed it now. Could it be that after mounting the registry for the first time, it would be possible to do all the work and we could unmount it just in time to save or discard the changes. That could save a lot of code, right? Cool, very illuminating! Thank you very much
Code: ToolKitHelper:Edge ToolKitHelper:OneDrive ToolKitHelper:SecureAssessmentBrowser ToolKitHelper:3DViewer ToolKitHelper:AdvertisingXaml ToolKitHelper:Alarms ToolKitHelper:BingWeather ToolKitHelper:Calculator ToolKitHelper:Camera ToolKitHelper:CommunicationsApps ToolKitHelper:Cortana ToolKitHelper:DesktopAppInstaller ToolKitHelper:FeedbackHub ToolKitHelper:GetHelp ToolKitHelper:Getstarted ToolKitHelper:HEIFImageExtension ToolKitHelper:Maps ToolKitHelper:MixedRealityPortal ToolKitHelper:OfficeHub ToolKitHelper:OfficeOneNote ToolKitHelper:Paint3D ToolKitHelper:People ToolKitHelper:Photos ToolKitHelper:ScreenSketch ToolKitHelper:SkypeApp ToolKitHelper:SolitaireCollection ToolKitHelper:SoundRecorder ToolKitHelper:StickyNotes ToolKitHelper:VP9VideoExtensions ToolKitHelper:WalletService ToolKitHelper:WebMediaExtensions ToolKitHelper:WebpImageExtensions ToolKitHelper:WindowsStore ToolKitHelper:XboxApp ToolKitHelper:XboxIdentityProvider ToolKitHelper:YourPhone ToolKitHelper:ZuneMusic ToolKitHelper:ZuneVideo ToolKitHelper:SecurityCenter ToolKitHelper:SmartScreen ToolKitHelper:WindowsDefender ToolKitHelper:XboxGameCallableUI RemovePkgsList MSMG, Is this enough to make a clean version of Windows 10 look like an LTSC version? p.s How to remove the cortana button from the taskbar in the context menu and during installation on a page in OOBE? The cortana button may disappear or appear, I tried to use tweaks, but they do not change anything!
I made the mods to replace in the toolkit It is the same script, but with the improvement to increase the speed of removal. Insert replacing the range of lines 20930 to 21001 Replace with the code below. Code: if "%Component%" equ "SystemApps" ( if "%ImageFlag%" neq "Core" if "%ImageFlag%" neq "CoreN" if "%ImageFlag%" neq "CoreSingleEdition" %ToolKitHelper% "%InstallMount%\%%i" AssignedAccessLockApp" if "%ImageBuild%" geq "17763" if "%ImageBuild%" leq "18363" %ToolKitHelper% "%InstallMount%\%%i" Cortana" if "%ImageFlag%" neq "EnterpriseS" if "%ImageFlag%" neq "EnterpriseSN" if "%ImageFlag%" neq "EnterpriseS" if "%ImageFlag%" neq "EnterpriseSN" %ToolKitHelper% "%InstallMount%\%%i" Edge" if "%ImageBuild%" geq "17763" if "%ImageBuild%" leq "18363" if "%ImageFlag%" neq "Core" if "%ImageFlag%" neq "CoreN" if "%ImageFlag%" neq "CoreSingleEdition" if "%ImageFlag%" neq "EnterpriseS" if "%ImageFlag%" neq "EnterpriseSN" %ToolKitHelper% "%InstallMount%\%%i" PPIProjection" %ToolKitHelper% "%InstallMount%\%%i" AADBrokerPlugin;BioEnrollment;CBSPreview;ContentDeliveryManager;ECApp;EdgeDevToolsClient;FileExplorer;LockApp;Map MapControl;NarratorQuickStart;OneDrive;ParentalControls;PeopleExperienceHost;QuickAssist;RetailDemoContent;SecureAssessmentBrowser;SettingSync;SkypeORTC;SmartScreen;Win32WebViewHost;WindowsDefender;WindowsMixedReality;WindowsReaderPDF;XboxGameCallableUI ) if "%Component%" equ "WindowsApps" ( if "%ImageBuild%" equ "19041" %ToolKitHelper% "%InstallMount%\%%i" Cortana if "%ImageBuild%" leq "18363" if "%ImageBuild%" equ "19041" %ToolKitHelper% "%InstallMount%\%%i" ZuneVideo %ToolKitHelper% "%InstallMount%\%%i" 3DViewer;AdvertisingXaml;Alarms;BingWeather;Calculator;Camera;CommunicationsApps;DesktopAppInstaller;FeedbackHub;GetHelp;Getstarted;HEIFImageExtension;Maps;Messaging;MixedRealityPortal;OfficeHub;OfficeOneNote;OneConnect;Paint3D;People;Photos;Print3D;ScreenSketch;SkypeApp;SolitaireCollection;SoundRecorder;StickyNotes;VP9VideoExtensions;WalletService;WebMediaExtensions;WebpImageExtensions;WindowsStore;XboxApp;XboxIdentityProvider;YourPhone;ZuneMusic ) and Insert replacing the range of lines 21131 to 21202 Replace with the code below. Code: if "%Component%" equ "SystemApps" ( if "%ImageFlag%" neq "Core" if "%ImageFlag%" neq "CoreN" if "%ImageFlag%" neq "CoreSingleEdition" %ToolKitHelper% "%InstallMount%" AssignedAccessLockApp" if "%ImageBuild%" geq "17763" if "%ImageBuild%" leq "18363" %ToolKitHelper% "%InstallMount%" Cortana" if "%ImageFlag%" neq "EnterpriseS" if "%ImageFlag%" neq "EnterpriseSN" if "%ImageFlag%" neq "EnterpriseS" if "%ImageFlag%" neq "EnterpriseSN" %ToolKitHelper% "%InstallMount%" Edge" if "%ImageBuild%" geq "17763" if "%ImageBuild%" leq "18363" if "%ImageFlag%" neq "Core" if "%ImageFlag%" neq "CoreN" if "%ImageFlag%" neq "CoreSingleEdition" if "%ImageFlag%" neq "EnterpriseS" if "%ImageFlag%" neq "EnterpriseSN" %ToolKitHelper% "%InstallMount%" PPIProjection" %ToolKitHelper% "%InstallMount%" AADBrokerPlugin;BioEnrollment;CBSPreview;ContentDeliveryManager;ECApp;EdgeDevToolsClient;FileExplorer;LockApp;Map MapControl;NarratorQuickStart;OneDrive;ParentalControls;PeopleExperienceHost;QuickAssist;RetailDemoContent;SecureAssessmentBrowser;SettingSync;SkypeORTC;SmartScreen;Win32WebViewHost;WindowsDefender;WindowsMixedReality;WindowsReaderPDF;XboxGameCallableUI ) if "%Component%" equ "WindowsApps" ( if "%ImageBuild%" equ "19041" %ToolKitHelper% "%InstallMount%" Cortana if "%ImageBuild%" leq "18363" if "%ImageBuild%" equ "19041" %ToolKitHelper% "%InstallMount%" ZuneVideo %ToolKitHelper% "%InstallMount%" 3DViewer;AdvertisingXaml;Alarms;BingWeather;Calculator;Camera;CommunicationsApps;DesktopAppInstaller;FeedbackHub;GetHelp;Getstarted;HEIFImageExtension;Maps;Messaging;MixedRealityPortal;OfficeHub;OfficeOneNote;OneConnect;Paint3D;People;Photos;Print3D;ScreenSketch;SkypeApp;SolitaireCollection;SoundRecorder;StickyNotes;VP9VideoExtensions;WalletService;WebMediaExtensions;WebpImageExtensions;WindowsStore;XboxApp;XboxIdentityProvider;YourPhone;ZuneMusic ) Please wait for approval from @MSMG. I hope you enjoy the contribution.
hey there @RaiyvaN why not post up your version of toolkit.cmd as an attachment with the changes? would that be possible? @MSMG would it be possible to have service removal and service disable capabilities added to the toolkit? it would be very useful
I am also learning. To view line numbers, use notepad ++ (npp). So you can see what I'm saying. This part that I modified is related to the part that allows you to remove all WindowsApps and the part that allows you to remove all SystemApps. But it removes everything at once instead of removing one at a time. Everything already tested and working. Edit: Adding an image ... This code above is a small part of the changes I am making, over the course of 2 months following the topic, to make my life easier, maintaining my PCs and some family members' PCs.
@MSMG What means 5 => 8 => L (Enable DISM Image Cleanup with Full ResetBase). What it does..?? Thanks in Advance..!!
@zero cool root if that option is ran, dism will completely delete files to install/deinstall the features I believe? I also believe if you've installed updates it will prevent you from uninstalling the updates, don't quote me on that however.
Hi there! First of all thanks to MSMG for this great toolkit! I hope its ok to post my question here. I try to slim down the GERMAN version of Win 10 LTSC 2019 with the MSMG toolkit 10.1 My problem is here: ISO have ImageServicePackBuild=316 for DE version ISO need ImageServicePackBuild=1 for US version to work with the toolkit so i got this message ToolKit component removal only work with the below Source OS Images... Windows 10 v1809 (10.0.17763.1) Source OS. (Thats the US version as far as i understand) Is there a simple solution to make this toolkit work with the German version? Or maybe can i use it first on the correct US Version and later integrate the German language? I just ask coz i dont know if language patch / integration after sliming down the image is possible. Thanks for any help and keep up this good work