MSMG ToolKit

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

  1. windows builder

    windows builder MDL Guru

    Joined:
    Sep 13, 2017
    Messages:
    2,030
    Likes Received:
    1,328
    Trophy Points:
    90
    LOL :D
     
  2. SuperVas220

    SuperVas220 MDL Novice

    Joined:
    May 4, 2018
    Messages:
    8
    Likes Received:
    2
    Trophy Points:
    0
  3. ffs_

    ffs_ MDL Junior Member

    Joined:
    Sep 17, 2016
    Messages:
    74
    Likes Received:
    39
    Trophy Points:
    0
    Would you elaborate? Problems with ToolKit or Windows updates after 418?
     
  4. mhussain

    mhussain MDL Member

    Joined:
    Oct 1, 2012
    Messages:
    184
    Likes Received:
    50
    Trophy Points:
    10
    hi!
    i'm about to perform a replace upgrade of windows 10 using a newly minted msmged iso,
    keeping files only,
    is this a good thing?
    anyone done this before?
    advice?
     
  5. Feartamixg

    Feartamixg MDL Addicted

    Joined:
    May 15, 2016
    Messages:
    555
    Likes Received:
    423
    Trophy Points:
    30
    I had no problems.
     
  6. MSMG

    MSMG MDL Developer

    Joined:
    Jul 15, 2011
    Messages:
    5,430
    Likes Received:
    11,396
    Trophy Points:
    180
    You can't remove it, you can only hide it and yes the CU can be installed but it will restore the removed components.


     
  7. MSMG

    MSMG MDL Developer

    Joined:
    Jul 15, 2011
    Messages:
    5,430
    Likes Received:
    11,396
    Trophy Points:
    180
    RemoveAppsList.txt to be used with [3] Remove Windows Apps using Apps List, which uses the standard DISM /Remove-ProvisionedAppxPackage command to remove the Apps.

    RemovePkgsList.txt can be used for both the DISM /Remove-Package command or to remove Apps and Components using ToolKitHelper method.

     
  8. MSMG

    MSMG MDL Developer

    Joined:
    Jul 15, 2011
    Messages:
    5,430
    Likes Received:
    11,396
    Trophy Points:
    180
    Do use with CU .418 or the latest CU .904.

     
  9. MSMG

    MSMG MDL Developer

    Joined:
    Jul 15, 2011
    Messages:
    5,430
    Likes Received:
    11,396
    Trophy Points:
    180
    Yes it seems the Edge Chromium package causing the pending.xml, do check with v2004 + CU without the Enablement package.

     
  10. robymetallaro

    robymetallaro MDL Junior Member

    Joined:
    Aug 17, 2016
    Messages:
    71
    Likes Received:
    2
    Trophy Points:
    0
    I don't know where to put it
     
  11. gdeliana

    gdeliana MDL Junior Member

    Joined:
    Oct 2, 2010
    Messages:
    65
    Likes Received:
    12
    Trophy Points:
    0
    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.
     
  12. Dragon16

    Dragon16 MDL Novice

    Joined:
    Feb 21, 2018
    Messages:
    19
    Likes Received:
    1
    Trophy Points:
    0
  13. RaiyvaN

    RaiyvaN MDL Senior Member

    Joined:
    Sep 23, 2009
    Messages:
    302
    Likes Received:
    347
    Trophy Points:
    10
    #15713 RaiyvaN, Jun 26, 2020
    Last edited: Jun 26, 2020
    @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.
     
  14. GrEaTwArRiOr

    GrEaTwArRiOr MDL Novice

    Joined:
    May 12, 2009
    Messages:
    14
    Likes Received:
    4
    Trophy Points:
    0
    #15714 GrEaTwArRiOr, Jun 27, 2020
    Last edited: Jun 27, 2020
    thank you for your hard work,
    can you please advise how to do it manually integrate PowerShell 7.0.2 Pack

    thanks
     
  15. MSMG

    MSMG MDL Developer

    Joined:
    Jul 15, 2011
    Messages:
    5,430
    Likes Received:
    11,396
    Trophy Points:
    180
    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.

     
  16. MSMG

    MSMG MDL Developer

    Joined:
    Jul 15, 2011
    Messages:
    5,430
    Likes Received:
    11,396
    Trophy Points:
    180
    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.

     
  17. MSMG

    MSMG MDL Developer

    Joined:
    Jul 15, 2011
    Messages:
    5,430
    Likes Received:
    11,396
    Trophy Points:
    180
    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.


     
  18. Dusktilldawn

    Dusktilldawn MDL Novice

    Joined:
    Oct 24, 2009
    Messages:
    46
    Likes Received:
    10
    Trophy Points:
    0
  19. Feartamixg

    Feartamixg MDL Addicted

    Joined:
    May 15, 2016
    Messages:
    555
    Likes Received:
    423
    Trophy Points:
    30