MSMG ToolKit

Discussion in 'MDL Projects and Applications' started by MSMG, Nov 21, 2013.

  1. RaiyvaN

    RaiyvaN MDL Senior Member

    Sep 23, 2009
    302
    347
    10
    #15721 RaiyvaN, Jun 27, 2020
    Last edited: Jun 27, 2020
    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
     
  2. rorewe4314

    rorewe4314 MDL Junior Member

    Jun 18, 2020
    70
    17
    0
    #15723 rorewe4314, Jun 27, 2020
    Last edited: Jun 27, 2020
    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!
     
  3. RaiyvaN

    RaiyvaN MDL Senior Member

    Sep 23, 2009
    302
    347
    10
    #15724 RaiyvaN, Jun 27, 2020
    Last edited: Jun 27, 2020
    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.
     
  4. mhussain

    mhussain MDL Member

    Oct 1, 2012
    184
    50
    10
    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
     
  5. mhussain

    mhussain MDL Member

    Oct 1, 2012
    184
    50
    10
    is there a utility that allows you to enable or disable services of a mounted image? a gui one?
     
  6. RaiyvaN

    RaiyvaN MDL Senior Member

    Sep 23, 2009
    302
    347
    10
    #15727 RaiyvaN, Jun 27, 2020
    Last edited: Jun 27, 2020
    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.
     

    Attached Files:

  7. zero cool root

    zero cool root MDL Senior Member

    Jun 17, 2011
    298
    89
    10
    @MSMG

    What means 5 => 8 => L (Enable DISM Image Cleanup with Full ResetBase). What it does..??

    Thanks in Advance..!!
     
  8. mhussain

    mhussain MDL Member

    Oct 1, 2012
    184
    50
    10
    @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.
     
  9. digital observer

    digital observer MDL Novice

    May 18, 2020
    2
    1
    0
    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 :)
     
  10. kosta26

    kosta26 MDL Junior Member

    Jan 1, 2019
    88
    5
    0
    I would like to see some steps to stop the return of components starting in 1903 and ending in 2004.
     
  11. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    5,430
    11,396
    180
    That call to UnMountImageRegistry is just to make sure the mounted image registry hives are unmounted if in case an error or exception while using the ToolKitHelper program.


    Since the ToolKitHelper is also made to be used standalone without the Toolkit, the registry mounting and un-mounting is essential within the ToolKitHelper.

     
  12. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    5,430
    11,396
    180
    Just remove the Windows Apps and System Apps and OneDrive, it will be a LTSC like build.

    May be I should make a one-click tool to build a LTSC like OS, if there is a demand then will make it,

    You can't remove the taskbar context menu like Cortana or Search buttons.

     
  13. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    5,430
    11,396
    180
    Yes it will work, just test the OS and see if there's any SFC errors.


     
  14. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    5,430
    11,396
    180
    For enabling or disabling services, you can do it with registry

    ; Enable Windows Search Indexing
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WSearch]
    "Start"=dword:00000002

    ; Disable Windows Search Indexing
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WSearch]
    "Start"=dword:00000004


     
  15. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    5,430
    11,396
    180
    Windows 10 is configured by default to ignore /ResetBase parameter and only delta-compress when the DISM /Cleanup-Image /StartComponentCleanup /ResetBase is used.

    Using this tweak it will enable the DISM to perform full reset base.

     
  16. rorewe4314

    rorewe4314 MDL Junior Member

    Jun 18, 2020
    70
    17
    0
    I don’t know what else can be removed from system applications, because some applications are in LTSC!
    It would be very nice if you could turn the regular version into LTSC, with the click of a button!
     
  17. digital observer

    digital observer MDL Novice

    May 18, 2020
    2
    1
    0