1. ceo54

    ceo54 MDL Addicted

    Aug 13, 2015
    969
    466
    30
    If you're not using an unattended installation, it's normal to chose a language at setup. It's not just windows 10, it's the same in all Windows.

    Integrating the updates, packs etc into boot and recovery will update those images too and present you the options for the integrated modules when you employ those images. If it's just about the updates, the safest bet is to integrate them in all 3 images wherever the Toolkit gives you the option to do so.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,627
    210
    Thanks for the advice, yes I have taken a long break and focusing on other things, there will be delay in Toolkit releases for some time.

    The DISM executable or DISMApi uses a session to service the WIM image, if the Toolkit is closed without unmounting the image and the system is restarted then
    the DISM won't service the image in such state and it requires to re-mount the image again.

     
  3. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,627
    210
    Can't integrate third party apps without license.xml files, will try with .msixbundle files integration and update whether it works or not.

     
  4. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,627
    210
    You have mixed up the code, here's the sample code

    Code:
    @echo off
    setlocal EnableExtensions EnableDelayedExpansion
    
    set "PackageName=Microsoft-Windows-OneDrive-Setup-Package~31bf3856ad364e35~amd64~~10.0.19041.1.mum"
    
    rem Mount the image
    Dism /Mount-Wim /WimFile:"%~dp0dvd\sources\install.wim" /index:1 /MountDir:"%~dp0mount"
    
    rem Set hidden package visible
    call :UnHidePackage "%~dp0mount", "%PackageName%"
    
    rem Remove the package
    Dism /Image:"%~dp0mount" /Remove-Package /PackageName:"%PackageName%"
    
    rem Commit changes and unmount the image
    Dism /Unmount-Wim /MountDir:"%~dp0mount" /Commit
    
    ::-------------------------------------------------------------------------------------------
    :: Function to unhide a Windows Component Package
    :: Input Parameters [ %~1 : Image Mount Path, %~2 : Package Name ]
    ::-------------------------------------------------------------------------------------------
    :UnHidePackage
    
    setlocal
    
    set RegistryKey=
    
    :: Mounting Image Registry
    call :MountImageRegistry "%~1" >nul
    
    :: Retriving Package Registry Key Path
    for /f "tokens=* delims=" %%a in ('reg query "HKLM\TK_SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" /f "%~2" ^| find /I "%~2"') do ( set "RegistryKey=%%a" )
    
    :: Making Windows Components Package visible
    reg add "%RegistryKey%" /v Visibility /t REG_DWORD /d 1 /f >nul 2>&1
    reg add "%RegistryKey%" /v DefVis /t REG_DWORD /d 2 /f >nul 2>&1
    reg delete "%RegistryKey%\Owners" /f >nul 2>&1
    
    :: Un-Mounting Image Registry
    call :UnMountImageRegistry
    
    set RegistryKey=
    
    endlocal
    
    goto :eof
    ::-------------------------------------------------------------------------------------------
    
    ::-------------------------------------------------------------------------------------------
    :: Function to mount Image Registry
    :: Input Parameters [ %~1 : Image Mount Path ]
    ::-------------------------------------------------------------------------------------------
    :MountImageRegistry
    
    :: Mounting Image Registry for Offline Editing
    reg load HKLM\TK_SOFTWARE "%~1\Windows\System32\config\SOFTWARE" >nul
    
    goto :eof
    ::-------------------------------------------------------------------------------------------
    
    ::-------------------------------------------------------------------------------------------
    :: Function to unmount Image Registry
    :: Input Parameters [ None ]
    ::-------------------------------------------------------------------------------------------
    :UnMountImageRegistry
    
    :: Un-Mounting Image Registry
    reg unload HKLM\TK_SOFTWARE >nul 2>&1
    
    goto :eof
    ::-------------------------------------------------------------------------------------------
    
    endlocal EnableExtensions EnableDelayedExpansion
    

     
  5. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,627
    210
    For W7-W10 v1803 only DISM method of removal is supported and that too only Remove Windows Components using Package list method is supported.

    You can get the template list from Toolkit's <Bin\Lists\DISM_Templates> folder.

     
  6. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,627
    210
    You can get the template list Toolkit's <Bin\Lists\DISM_Templates> and <Bin\Lists\Features_Templates> folder.

     
  7. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,627
    210
    #18888 MSMG, Mar 28, 2021
    Last edited: Mar 28, 2021
    (OP)
    I'm keeping the components list to be minimal containing only what is required for an average user, adding more components means more dependencies and requires more troubleshooting. The component removal should not become like stripping the OS to the core and breaking most of it's functionality, will be adding possible new components to the list when time permits.

    The idea of package list method was added only for two reasons one to support component removal for older OS until manual method is ready and second to remove components faster since the removal program was slower in removing the components, Now the removal has become faster through menu too.

    In future Toolkit versions when I do move the Toolkit code from DOS batch programming to higher level programming, many things will be changing like there will minimal packs, simplified dynamic menus and reduced steps.

    Nowadays I'm using my time on next Toolkit products to bring new user experience for users.


     
  8. bill.fi.dill

    bill.fi.dill MDL Novice

    Mar 27, 2021
    3
    0
    0
    Thanks for your reply! That makes sense about not using unattended installations. I eventually want to do unattended installations in the future, so I'll need to learn how to do that. Do you have any resources I can reference when I get to that stage? Especially with regard to using MSMG?

    That's good to know. I'll just integrate them in all three whenever I'm given the option.

    For drivers, is there a particular format they need to be in (.exe, for example), and does it matter where I sourced them? Like from SDI, for instance?
     
  9. ceo54

    ceo54 MDL Addicted

    Aug 13, 2015
    969
    466
    30
    #18891 ceo54, Mar 28, 2021
    Last edited: Mar 28, 2021
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. doubtfire

    doubtfire MDL Junior Member

    May 26, 2015
    94
    8
    0
    And on that same note of broken installations,

    Does this render the Dism /RestoreHealth command unusable?
    Code:
    The restore operation failed. Either the repair source was not found or the component store cannot be repaired.
    Error: 0x800f081f
     
  11. doubtfire

    doubtfire MDL Junior Member

    May 26, 2015
    94
    8
    0
    I ended up running this, which at least enabled me to open the Settings (and any other MS "store" type of apps) again.
    Code:
    Get-AppxPackage -AllUsers| Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml” -Verbose }
    But I would like to know: Does this, in any way, undo the removals that MSMG Toolkit performs?
     
  12. rorewe4314

    rorewe4314 MDL Member

    Jun 18, 2020
    107
    22
    10
    MSMG,

    An error occurred trying to open - Microsoft-Windows-OneDrive-Setup-Package~31bf3856ad364e35~amd64~~10.0.19041.1.mum Error: 0x80070057

    Error: 87

    An error occurred while processing the command.
    Ensure that the command-line arguments are valid. For more information, review the log file.

    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log


    Didn't change anything in the script!
     
  13. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,627
    210
    Sorry it should be like below, remove .mum in Package Name

    PackageName=Microsoft-Windows-OneDrive-Setup-Package~31bf3856ad364e35~amd64~~10.0.19041.1


     
  14. Fen-X

    Fen-X MDL Novice

    Aug 31, 2019
    27
    31
    0
    Thank you very much MSMG. Your tool is so precious.
    A few days, weeks or maybe a month ago I asked for a possible solution regarding the removal components. System apps remain after a cu or a feature update.
    You replied that you were working on it.

    After much research I found a wonderful tool customized by raiyvaN called "W10AIO debloater v1.1 Final".
    With this tool, it seems possible to remove NcsiUwpApp and UndockedDevKit. Unfortunately, this tool is not working for me for some reasons. I'll give it another try someday because I'm curious. Thanks raiyanV for this work.
    In my despair I remembered that there was an option in the toolkit tool (turn off automatic updates). I decided to do more research on this option and in the end I gave it a try.
    I downloaded Windows 10 20h2 19042.631. I integrated the update (870 for cu and 867 for feature updates). I used the package list method to remove the components and this time I turned off the automatic update. On first boot I got the sfc error because I cleaned up the image. I started the sfc / scannow and the sfc got clean. I used pstool, db browser for sql and sqlite studio (for the trigger in machine-srd) to change the IsInbox value and successfully remove NcsiUwpApp and UndockedDevKit.

    The dangerous moment came when I started the Windows update and WOW ... WOW ... I got the security updates but this time no feature update shows up or something else . I checked in regedit and the automatic updates are indeed disabled. Finally, your tool saved me once again.
    In my case, I don't need new features. I am now running Windows 10 20h2 19042.870 (which already contains plenty of features) and I couldn't believe the solution was there from the start in your tool.
    Stupid that I am.

    Now I have a real win10 pro which will work like my previous ltsc2019.

    Thanks again. Fantastic tool. It s so speed with toolkit to install a windows os like I want it work.
     
  15. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,770
    3,601
    60
    #18900 inTerActionVRI, Mar 29, 2021
    Last edited: Mar 30, 2021
    @MSMG ,

    In that part, the code we talked about the other day is going on. If you select Y, you perform the task of cleaning the files, but if you select N, you are also performing the cleaning.
    so... from
    Code:
    choice /C:YN /N /M "Do you want to cleanup Image folder ? ['Y'es/'N'o] : "
    echo.
    if %errorlevel% equ 1 (
       echo.-------------------------------------------------------------------------------
       echo.Cleaning up Image folder...
       echo.-------------------------------------------------------------------------------
       echo.
       echo.Cleaning up Image temporary and log files or folders.
    
    to
    Code:
    choice /C:NY /N /M "Do you want to cleanup Image folder ? ['Y'es/'N'o] : "
    echo.
    if errorlevel 2 (
       echo.-------------------------------------------------------------------------------
       echo.Cleaning up Image folder...
       echo.-------------------------------------------------------------------------------
       echo.
       echo.Cleaning up Image temporary and log files or folders.
    
    Is it necessary to optimize boot.wim when it is not mounted during service with the toolkit?

    This is happening.

    When the work starts, without mounting the boot.wim, when the image is finished, optimization is taking place at the time of saving.

    Perhaps it should be so. But I don't know the dynamics. It may be interesting to optimize winre.wim, but within what I have absorbed until the moment of knowledge, it would not be necessary. I may be mistaken.
    from
    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"
       )
    )
    
    :: Re-Building Source Boot Image with Maximum Compression.
    echo.-------------------------------------------------------------------------------
    echo.Optimizing Source [Boot.wim] Image with Maximum Compression...
    echo.-------------------------------------------------------------------------------
    call :ExportImage "%BootWim%", "%Temp%\rebuild.wim", "WIM", "No"
    move /y "%Temp%\rebuild.wim" "%BootWim%" >nul
    
    to
    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%\rebuild.wim", "WIM", "No"
       )
       move /y "%Temp%\rebuild.wim" "%BootWim%" >nul
    )
    
    maybe
    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] Image with Maximum Compression...
       echo.-------------------------------------------------------------------------------
       call :ExportImage "%BootWim%", "%Temp%\rebuildBoot.wim", "WIM", "No"
       move /y "%Temp%\rebuild.wim" "%BootWim%" >nul
    )
    
    Some minor i send to you in PM.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...