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
    #18941 RaiyvaN, Mar 30, 2021
    Last edited: Mar 30, 2021
    No... No, that was not what I wanted to say. There are moments when I want to ask questions and I don't express myself properly. Sometimes I say a few things to finally ask something and forget, heheheh

    So, you don't have to change it. That was the logical reason that I lacked, to understand the sense of why to optimize, even if it had not been mounted.
    Good point.

    In this way, it would also be interesting to optimize WinRE.wim even if it is not mounted.

    I had problems with the code that you demonstrated to be working.
    I don't know why I'm having some problems with the Batch Script in this edition that I'm using, it wasn't supposed to occur. Daily use version: Windows 10 Pro for Workstation 1909 18363.418.
    I imagined other people experiencing this problem. Only, that is why I suggested such a change.

    So, boot.wim could be with ExportImageIndex if Is BootImage Selected and ExportImage if not.
    But I don't know if that would really be necessary. I think about leaving it like that, in custom because there is optimization for each index in boot.wim, in particular, no more reason.

    And, for WinRE.wim this does not interfere since there is an image for each index, just move the ExportImage outside the scope of IsRecoveryImageSelected.
    follow the code:
    Code:
    :: Saving & Un-Mounting Source Boot Images
    if "%IsBootImageSelected%" equ "Yes" (
       for /l %%i in (1, 1, 2) do (
           echo.-------------------------------------------------------------------------------
           echo.Applying Changes ^& Un-Mounting [Boot.wim, Index : %%i] Image...
           echo.-------------------------------------------------------------------------------
           call :UnMountImage "%BootMount%\%%i", "Commit"
           call :RemoveFolder "%BootMount%\%%i"
    
           :: Optimizing Source Boot Image with Maximum Compression.
           echo.-------------------------------------------------------------------------------
           echo.Optimizing Source [Boot.wim, Index : %%i] Image with Maximum Compression...
           echo.-------------------------------------------------------------------------------
           call :ExportImageIndex "%BootWim%", %%i, "%Temp%\rebuildBoot.wim", "WIM", "No"
       )
    ) else (
       :: Optimizing Source Boot Image with Maximum Compression.
       echo.-------------------------------------------------------------------------------
       echo.Optimizing Source [Boot.wim] Image with Maximum Compression...
       echo.-------------------------------------------------------------------------------
       call :ExportImage "%BootWim%", "%Temp%\rebuildBoot.wim", "WIM", "No"
    )
    move /y "%Temp%\rebuildBoot.wim" "%BootWim%" >nul
    
    :: Saving & Un-Mounting Source Install & Recovery Images
    for /l %%i in (1, 1, %ImageCount%) do (
       if exist "%InstallMount%\%%i" (
           if "%IsRecoveryImageSelected%" equ "Yes" (
               echo.-------------------------------------------------------------------------------
               echo.Applying Changes ^& Un-Mounting [Install.wim, Index : %%i -^> WinRE.wim] Image...
               echo.-------------------------------------------------------------------------------
               call :UnMountImage "%WinReMount%\%%i", "Commit"
               call :RemoveFolder "%WinReMount%\%%i"
           )
    
           :: Optimizing Source Recovery Image with Maximum Compression.
           echo.-------------------------------------------------------------------------------
           echo.Optimizing Source [Install.wim, Index : %%i -^> WinRE.wim] Image...
           echo.-------------------------------------------------------------------------------
           call :ExportImage "%InstallMount%\%%i\%WinReWim%", "%Temp%\rebuildWinRE.wim", "WIM", "No"
           move /y "%Temp%\rebuildWinRE.wim" "%InstallMount%\%%i\%WinReWim%" >nul
    
           echo.-------------------------------------------------------------------------------
           echo.Applying Changes ^& Un-Mounting [Install.wim, Index : %%i] Image...
           echo.-------------------------------------------------------------------------------
           call :UnMountImage "%InstallMount%\%%i", "Commit"
           call :RemoveFolder "%InstallMount%\%%i"
       )
    )
    
    Hence it is up to you what is appropriate and what is not.

    Thanks for feedback, @MSMG!
    Cheers!
     
  2. Jerameat

    Jerameat MDL Novice

    Jul 25, 2019
    1
    0
    0
    Hello!

    Im trying to use the tookkit to remove windows components but it keeps throwing out "\MSMGTOOKIT\Bin\ToolKitHelper.exe' is not recognized as an internal or external command, operable program or batch file." is there something Im missing on this?
     
  3. Fen-X

    Fen-X MDL Novice

    Aug 31, 2019
    27
    31
    0
    #18943 Fen-X, Mar 30, 2021
    Last edited: Mar 30, 2021
    On my side, edge and edge chromium were removed and didn t still remain. Can you give more info as i can tell you what to do to solve your issue?
     
  4. Ace2

    Ace2 MDL Addicted

    Oct 10, 2014
    523
    320
    30
    MSMG Please add these packages to removal.

    Microsoft.AccountsControl_cw5n1h2txyewy
    Microsoft.AsyncTextService_8wekyb3d8bbwe
    microsoft.creddialoghost_cw5n1h2txyewy
    Microsoft.Windows.AddSuggestedFoldersToLibraryDialog_cw5n1h2txyewy
    Microsoft.Windows.AppResolverUX_cw5n1h2txyewy
    Microsoft.Windows.CapturePicker_cw5n1h2txyewy
    Microsoft.Windows.FilePicker_cw5n1h2txyewy
    Microsoft.Windows.PinningConfirmationDialog_cw5n1h2txyewy
    Microsoft.Windows.XGpuEjectDialog_cw5n1h2txyewy
    MicrosoftWindows.Client.CBS_cw5n1h2txyewy
    MicrosoftWindows.UndockedDevKit_cw5n1h2txyewy
    NcsiUwpApp_8wekyb3d8bbwe

    Or post how to remove with command.;)
     
  5. JLT2000

    JLT2000 MDL Novice

    Nov 3, 2020
    36
    14
    0
    #18945 JLT2000, Mar 31, 2021
    Last edited: Mar 31, 2021
    Remember to use whd update pack before, it will only work with the CU update kb5000802 from the changelog 1904X.867. Thx to MSMG, or who made it possible.:cool:

    If you dont use the right CU update, it will not work as expected, (only removal with Toolkit Method, is not possible anymore)

    Thx to MS security crap in 2004 and above

    I just made and image with this list, and both edge is gone

    3-3-2 (Toolkit Method)

    EdgeChromium
    CEIP
    LocationService
    UnifiedTelemetryClient
    WindowsInsiderHub
    CBSPreview
    ContentDeliveryManager
    Edge
    MapControl
    OneDrive
    PeopleExperienceHost
    RetailDemoContent
    XboxClient
    3DViewer
    AdvertisingXaml
    Alarms
    BingWeather
    Camera
    CommunicationsApps
    Cortana
    DesktopAppInstaller
    FeedbackHub
    GetHelp
    Getstarted
    Maps
    MixedRealityPortal
    OfficeHub
    OfficeOneNote
    Paint3D
    People
    Photos
    ScreenSketch
    SkypeApp
    SolitaireCollection
    SoundRecorder
    StickyNotes
    XboxApp
    XboxIdentityProvider
    YourPhone
    ZuneMusic
    ZuneVideo
     
  6. rorewe4314

    rorewe4314 MDL Junior Member

    Jun 18, 2020
    70
    17
    0
    MSMG, How can I display a list of hidden packages in a txt file? Can I remove Edge Browser using this method and how can I add it to the script?
    P.S
    Everything works great!
     
  7. Fen-X

    Fen-X MDL Novice

    Aug 31, 2019
    27
    31
    0
    To remove asynctext etc... you can use pstool, db browser for sql and sqlite studio (for the trigger in machine-srd) to change the IsInbox value. After that you will be able to remove them with powershell command.

    Tonight, i will try to describe the hole process.
     
  8. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    5,430
    11,396
    180
    Oh yes for W7 forgot to add the DISM package and feature list, will compile the list and add it.

     
  9. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    5,430
    11,396
    180
    Without DISM? then you need to manually remove the file and registry data reading the package .mum (if available), .manifest files and the registry.

     
  10. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    5,430
    11,396
    180
    You can use ExportImage for Boot.wim since it does the task at once and also reduces the steps, the current Toolkit version uses ExportImage.

    Yes the optimize image for recovery image can be moved out of the loop.


     
  11. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    5,430
    11,396
    180
    What's the source OS used and Is it Edge or Edge Chromium you referring?

    Even for older OS version below v2004, the MS has included the Edge Chromium with the CU and the Toolkit removal program needs to be updated to support removing Edge Chromium for these OS.

     
  12. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    5,430
    11,396
    180
    What's the source OS used and Is it Edge or Edge Chromium you referring?

    Even for older OS version below v2004, the MS has included the Edge Chromium with the CU and the Toolkit removal program needs to be updated to support removing Edge Chromium for these OS.

     
  13. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    5,430
    11,396
    180
    Will be adding below components for removal when I do resume updating the Toolkit removal program, it will be available from next version.

    Microsoft.AsyncTextService_8wekyb3d8bbwe - related to Maps and People
    microsoft.creddialoghost_cw5n1h2txyewy - Related to Hello UI
    Microsoft.Windows.XGpuEjectDialog_cw5n1h2txyewy - Modern Safe to Eject for External GPU
    NcsiUwpApp_8wekyb3d8bbwe - Related to Network Status Indicator for modern Apps.
    MicrosoftWindows.Client.CBS_cw5n1h2txyewy (User Experience for Windows) - Required for Touch screen, Store, it includes InputApp

    These components are required, so need to further check.

    Microsoft.AccountsControl_cw5n1h2txyewy - Required for User creation, Logging into Microsoft Services including Store and Edge Chromium
    Microsoft.Windows.AddSuggestedFoldersToLibraryDialog_cw5n1h2txyewy - Need to check
    Microsoft.Windows.AppResolverUX_cw5n1h2txyewy - Required for modern Open With Dialog
    Microsoft.Windows.CapturePicker_cw5n1h2txyewy - Required for Screen capture function
    Microsoft.Windows.FilePicker_cw5n1h2txyewy - Required for Modern File open/save dialog
    Microsoft.Windows.PinningConfirmationDialog_cw5n1h2txyewy - Required for Pin to Taskbar
    MicrosoftWindows.UndockedDevKit_cw5n1h2txyewy - Required for Settings and OOBE

     
  14. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    5,430
    11,396
    180
    The below command will get the list of all packages excluding the language related.

    Code:
    Dir Windows\servicing\Packages\*.mum | findstr /v "en-US"
    
     
  15. RaiyvaN

    RaiyvaN MDL Senior Member

    Sep 23, 2009
    302
    347
    10
    #18955 RaiyvaN, Mar 31, 2021
    Last edited: Mar 31, 2021
    Code:
    :: Saving & Un-Mounting Source Boot Images
    for /l %%i in (1, 1, 2) do (
       if exist "%BootMount%\%%i" (
           if "%IsBootImageSelected%" equ "Yes" (
               echo.-------------------------------------------------------------------------------
               echo.Applying Changes ^& Un-Mounting [Boot.wim, Index : %%i] Image...
               echo.-------------------------------------------------------------------------------
               call :UnMountImage "%BootMount%\%%i", "Commit"
               call :RemoveFolder "%BootMount%\%%i"
           )
       )
    )
    :: Optimizing Source Boot Image with Maximum Compression.
    echo.-------------------------------------------------------------------------------
    echo.Optimizing Source [Boot.wim] Image with Maximum Compression...
    echo.-------------------------------------------------------------------------------
    call :ExportImage "%BootWim%", "%Temp%\rebuildBoot.wim", "WIM", "No"
    move /y "%Temp%\rebuildBoot.wim" "%BootWim%" >nul
    
    Yes, I was going to ask about it.

    But now the question would be different.

    How could we do the conditions?
    They would have to be based on:
    if "%ImageBuild% geq "18362" if "%ImageBuild%" leq "18363" if %ImageServicePackBuild% gtr 1400 (
    if "%ImageBuild% geq "19041" if "%ImageBuild%" lss "19042" if %ImageServicePackBuild% gtr 900 (

    So:
    From which CU build did Edge Chromium begin to be forced?
     
  16. Wetryshka

    Wetryshka MDL Member

    Apr 16, 2017
    141
    29
    10
    I've used ISO for 19043.899 from UUP Dump, I've removed Edge Chromium (I guess) with the Toolkit, however in VM, Edge was still there.
     
  17. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    5,430
    11,396
    180
    I don't know from which CU but noticed with the current preview CU, knew that for v2004 it will be bundled but now even for 1903/9 it's been added, for v1809 it's not included.

    Now it's a mess first they released a Edge Chromium standalone update package which will copy the edge files to WinSxS folder and later gets installed on first boot.
    Then they included Edge Chromium package with 1909/2009 Enablement package which did the same as Edge Chromium standalone update package, later they released sysprep images with Edge Chromium installed.

    Now they included Edge Chromium as a .wim image embedded with-in the CU which gets applied to the Install.wim like I did created Edge Chromium Pack earlier for Toolkit.

    Don't know whether they will stop releasing Edge Chromium standalone update package or including it with Enablement package, I hope they do stop it and follow the Current CU embedded method so that it would be easy to check for Edge Chromium existence and removal.

    Soon or later the removal program needs to be update to current CU so it doesn't matter from which CU it's been included.

     
  18. RaiyvaN

    RaiyvaN MDL Senior Member

    Sep 23, 2009
    302
    347
    10
    But then there is no need to place conditions.

    Simply place the Edge Chromium to be displayed in the menu.

    If it is present, in a way that the toolkithelper current version recognizes it will be removed. otherwise, only that message will appear:

    "This component has already been removed."


    Edit:
    Today I had time to get involved in the Custom Toolkit, and I decided to merge with the last cmd that you posted on the 22nd.

    I'll take advantage and leave this option active, as well as some Custom typos have been fixed and the optimization has been implemented.
     
  19. RaiyvaN

    RaiyvaN MDL Senior Member

    Sep 23, 2009
    302
    347
    10
    #18960 RaiyvaN, Mar 31, 2021
    Last edited: Apr 1, 2021
    https://forums.mydigitallife.net/threads/msmg-toolkit.50572/page-793#post-1606110

    Sent an 2021-03-31 updated file in the link above.

    Merged with Toolkit.cmd 11.4 2021-03-21 included in MEGA on 2021-03-22.

    Fixed Custom Toolkit typos:
    in the :StartIntegration session that was skipping Integrate Custom Features;
    in Select EdgeChromium to remove, for ImageBuild Greater than 19041.

    EdgeChromium display conditions, removed. It is now displayed in the Menu for any Build.

    If the Edge Chromuim is not present or the removal method has to be updated, at most that familiar message will appear:
    "This component has already been removed."

    Optimization of boot.wim and WinRE.wim has been implemented, regardless of whether they are mounted or not, whenever we save our work they will be optimized.

    Improved :WIMExport session code.
    Code:
      [1] Just Create a New [Install.wim]
      [2] Create a New [Install.wim] and replace the previous one.
      [3] Add selected Image Indexes to the same [Install.wim]
          Note: The chosen ones will be added after the already exists Image Indexes
    
    Enter your choice :
    
    Before I didn't have the option to replace it, I needed it today, then I put it there.

    Merged with Toolkit 11.3 and 11.4.

    *Some Custom Toolkit Tweaks and Remove Menu minor fixes and code improvement.

    Returned to the Toolkit standard aspect Ratio.
    In this way, all the menus that require more space to show the menus on the screen, have been divided into more screens.
    just press B to Back and N to Next. This, just to avoid the use of scrolling with each choice made in the menu, which you are working on.

    Get ImageBuild from updated Image system, implemented to correct the error in the automated making ISO label and file name.

    All the environment and path variables for the packs were concentrated in some sessions, at the beginning of the custom toolkit. This way it is easier to reset the variables at each integration performed. Also so that the multiple choice system facilitates the multiple integration of features sequentially.
    Multiple choice has been implemented within the integrate menu, for all features that are submenus.
    In other words, if it is a sub menu, a negative sign will appear as a default. If it is to integrate this signal it will become positive. To apply the integration you must go back to the "Integrate Menu" and choose "Start Integration".
    In the options without signaling, integration will occur as soon as you select.

    These are the submenus mentioned:
    IntLanguagePacksMenu (tested)
    IntDriversMenu
    IntInboxAppsMenu
    IntRSATMenu
    IntOfficeUWPAppsMenu
    IntDaRTMenu (tested)
    IntThinPCpkgsMenu
    IntGamesMenu (tested)
    IntCustomFeaturesMenu (tested)

    Note: As I said earlier in the post below,
    these changes were made in order to implement the multiple choice system in the menus but there may be variables that do not get the values set and end up breaking something. We always think that we thought of all the possibilities until we found something new to be corrected or improved. As I said before, I can't test everything here for lack of storage space.
    Then, for final images of daily use, make integrations with the Official Toolkit. Removal, Customizations, Tweaks, can be done with Custom, if you want.
    So, it is necessary that this part be tested by volunteers. I am grateful for the feedbacks.


    Thnks!

    Edit: I forgot to mention changes in the session: WIMExport. Added in today's changelog.