1. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,411
    15,487
    210
    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.

     
  2. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,411
    15,487
    210
    Do use with CU .418 or the latest CU .904.

     
  3. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,411
    15,487
    210
    Yes it seems the Edge Chromium package causing the pending.xml, do check with v2004 + CU without the Enablement package.

     
  4. robymetallaro

    robymetallaro MDL Junior Member

    Aug 17, 2016
    72
    2
    0
    I don't know where to put it
     
  5. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    365
    420
    10
    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.
     
  6. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,651
    3,398
    60
    #15707 inTerActionVRI, 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.
     
  7. GrEaTwArRiOr

    GrEaTwArRiOr MDL Novice

    May 12, 2009
    14
    4
    0
    #15708 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
     
  8. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,411
    15,487
    210
    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.

     
  9. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,411
    15,487
    210
    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.

     
  10. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,411
    15,487
    210
    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.


     
  11. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,651
    3,398
    60
    #15715 inTerActionVRI, 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
     
  12. rorewe4314

    rorewe4314 MDL Member

    Jun 18, 2020
    107
    22
    10
    #15717 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!
     
  13. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,651
    3,398
    60
    #15718 inTerActionVRI, 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.
     
  14. mhussain

    mhussain MDL Senior Member

    Oct 1, 2012
    352
    139
    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
     
  15. mhussain

    mhussain MDL Senior Member

    Oct 1, 2012
    352
    139
    10
    is there a utility that allows you to enable or disable services of a mounted image? a gui one?