1. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,627
    210
    Did you used Integrate WHD Updates Pack menu?
     
  2. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,627
    210
    It was added by mistake, now the x86 reg file has been removed from the download link.
     
  3. BruhBen

    BruhBen MDL Novice

    Feb 13, 2022
    10
    4
    0
    Yes, I tried using both the Windows Updates and WHD Updates Pack menu and they both gave me the same result.
     
  4. graver.x

    graver.x MDL Senior Member

    Jan 18, 2020
    349
    486
    10
  5. bala1

    bala1 MDL Member

    May 2, 2015
    179
    150
    10
    Thanks for new version v12.2 CustomToolkit ok
    .
    .
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. BruhBen

    BruhBen MDL Novice

    Feb 13, 2022
    10
    4
    0
    Oh, okay I was under the impression that the contents of the .msu(s) needed to be extracted.

    I tried again, this time using the .msus for the CU & .NET and managed to get the SSU (which was inside the CU's .msu) and even the .NET Framework to work. However, the CU itself failed and the Dynamic Update wasn't even recognized:

    Code:
    ===============================================================================
    
                       MSMG ToolKit - Integrate WHD General Updates
    
                    to Windows Setup Boot, Install & Recovery Images
    
    ===============================================================================
    
    
    -------------------------------------------------------------------------------
    
    ##################Starting Integrating WHD General Updates#####################
    
    ##############to Windows Setup Boot, Install & Recovery Images#################
    
    -------------------------------------------------------------------------------
    
    
        Image                    : Boot.wim         |  Install.wim   |  WinRE.wim
    
        Image Index              : 1, 2             |      6         |      1
    
        Image Architecture       : x64
    
        Image Version            : 10.0.22000.318.0
    
    
    -------------------------------------------------------------------------------
    
    ####Processing WHD General Updates Packages####################################
    
    -------------------------------------------------------------------------------
    
    
    Creating WHD General Updates Temporary folder...
    
    
    Extracting Update Package files to Temporary folder...
    
    
    Finished Extracting Update Package files to Temporary folder...
    
    
    -------------------------------------------------------------------------------
    
    ####Integrating WHD General Updates to Windows Setup Install Image#############
    
    -------------------------------------------------------------------------------
    
    
    ===========================[Install.wim, Index : 6]============================
    
    
    -------------------------------------------------------------------------------
    
    Integrating Windows 11 Servicing Stack Update Package...
    
    -------------------------------------------------------------------------------
    
    
    Deployment Image Servicing and Management tool
    
    Version: 10.0.22598.1
    
    
    Image Version: 10.0.22000.318
    
    
    Processing 1 of 1 - Adding package Package_for_ServicingStack_581~31bf3856ad364e35~amd64~~22000.581.1.0
    
    [==========================100.0%==========================]
    
    The operation completed successfully.
    
    
    -------------------------------------------------------------------------------
    
    Integrating Windows 11 Cumulative Update Package...
    
    -------------------------------------------------------------------------------
    
    
    Deployment Image Servicing and Management tool
    
    Version: 10.0.22598.1
    
    
    Image Version: 10.0.22000.318
    
    
    Processing 1 of 1 - Adding package Package_for_RollupFix~31bf3856ad364e35~amd64~~22000.613.1.25
    
    [==========================100.0%==========================]
    
    An error occurred - Package_for_RollupFix Error: 0x800f0988
    
    
    Error: 0x800f0988
    
    
    DISM failed. No operation was performed.
    
    For more information, review the log file.
    
    
    The DISM log file can be found at D:\Toolkit\Logs\Dism.txt
    
    
    -------------------------------------------------------------------------------
    
    Integrating Microsoft .NET Cumulative Update Package...
    
    -------------------------------------------------------------------------------
    
    
    Deployment Image Servicing and Management tool
    
    Version: 10.0.22598.1
    
    
    Image Version: 10.0.22000.318
    
    
    Processing 1 of 1 - Adding package Package_for_DotNetRollup~31bf3856ad364e35~amd64~~10.0.4494.3
    
    [==========================100.0%==========================]
    
    The operation completed successfully.
    (I skipped the Boot & Recovery, but it was essentially the same but without the .Net Framework.)


    So, I extracted the contents of the CU and tried again with the additional SSU.cab, CU.cab & CU.psf which resulted in them also not being recognized:

    Code:
    ===========================[Install.wim, Index : 6]============================
    
    
    -------------------------------------------------------------------------------
    
    Integrating Microsoft .NET Cumulative Update Package...
    
    -------------------------------------------------------------------------------
    
    
    Deployment Image Servicing and Management tool
    
    Version: 10.0.22598.1
    
    
    Image Version: 10.0.22000.318
    
    
    Processing 1 of 1 - Adding package Package_for_DotNetRollup~31bf3856ad364e35~amd64~~10.0.4494.3
    
    [==========================100.0%==========================]
    
    The operation completed successfully.

    Afterwards, I tried combining the .cab & .psf using PSFX_Repack and placed it alone in Toolkit\Updates\w11\x64\ and then tried Integrate Windows Updates. This method actually worked.

    Code:
    ===============================================================================
    
                       MSMG ToolKit - Integrate Windows Updates
    
    ===============================================================================
    
    
    -------------------------------------------------------------------------------
    
    ####Starting Integrating Windows Updates#######################################
    
    -------------------------------------------------------------------------------
    
    
        Image                    : Install.wim
    
        Image Index              : 6
    
        Image Architecture       : x64
    
        Image Version            : 10.0.22000.318.0
    
    
    -------------------------------------------------------------------------------
    
    ####Processing Windows Updates Packages########################################
    
    -------------------------------------------------------------------------------
    
    
    Creating Windows Updates Packages Temporary folder...
    
    
    Extracting Update Package files to Temporary folder...
    
    
    Finished Extracting Update Package files to Temporary folder...
    
    
    -------------------------------------------------------------------------------
    
    ####Integrating Windows Updates################################################
    
    -------------------------------------------------------------------------------
    
    
    ===========================[Install.wim, Index : 6]============================
    
    
    Deployment Image Servicing and Management tool
    
    Version: 10.0.22598.1
    
    
    Image Version: 10.0.22000.318
    
    
    Processing 1 of 1 - Adding package Package_for_RollupFix~31bf3856ad364e35~amd64~~22000.613.1.25
    
    [==========================100.0%==========================]
    
    The operation completed successfully.
    
    
    -------------------------------------------------------------------------------
    
    Generating Windows Updates Integration LOG File...
    
    -------------------------------------------------------------------------------
    
    
    Writing Windows Updates Integration Log file.
    
    
    -------------------------------------------------------------------------------
    
    Cleaning Up Temporary Files & Folders...
    
    -------------------------------------------------------------------------------
    
    
    Cleaning Up Windows Updates Temporary folder.
    
    
    -------------------------------------------------------------------------------
    
    ####Finished Integrating Windows Updates#######################################
    
    -------------------------------------------------------------------------------
    
    
    ===============================================================================
    
    
    Press any key to continue . . .
    But that was the CU by itself without even the SSU.


    So I then decided to try using the Integrate Windows Updates with the following:

    Servicing Stack .cab (from CU.msu)
    Dynamic Update .cab (KB5011579)
    Cumulative Update (Windows10.0-KB5012592-x64-full_psfx) .cab
    Cumulative Update for .NET Framework (KB5012121)

    And I was finally able to get them all to work! I don't know why it didn't work to begin with since I essentially went in a giant circle but I'm glad this works as a solution.

    Code:
    ===============================================================================
    
                       MSMG ToolKit - Integrate Windows Updates
    
    ===============================================================================
    
    
    -------------------------------------------------------------------------------
    
    ####Starting Integrating Windows Updates#######################################
    
    -------------------------------------------------------------------------------
    
    
        Image                    : Install.wim
    
        Image Index              : 6
    
        Image Architecture       : x64
    
        Image Version            : 10.0.22000.318.0
    
    
    -------------------------------------------------------------------------------
    
    ####Processing Windows Updates Packages########################################
    
    -------------------------------------------------------------------------------
    
    
    Creating Windows Updates Packages Temporary folder...
    
    
    Extracting Update Package files to Temporary folder...
    
    
    Finished Extracting Update Package files to Temporary folder...
    
    
    -------------------------------------------------------------------------------
    
    ####Integrating Windows Updates################################################
    
    -------------------------------------------------------------------------------
    
    
    ===========================[Install.wim, Index : 6]============================
    
    
    Deployment Image Servicing and Management tool
    
    Version: 10.0.22598.1
    
    
    Image Version: 10.0.22000.318
    
    
    Processing 1 of 3 - Adding package Package_for_ServicingStack_581~31bf3856ad364e35~amd64~~22000.581.1.0
    
    [==========================100.0%==========================]
    
    Processing 2 of 3 - Adding package Package_for_KB5011579~31bf3856ad364e35~amd64~~22000.587.1.3
    
    [==========================100.0%==========================]
    
    Processing 3 of 3 - Adding package Package_for_RollupFix~31bf3856ad364e35~amd64~~22000.613.1.25
    
    [==========================100.0%==========================]
    
    The operation completed successfully.
    
    
    -------------------------------------------------------------------------------
    
    Generating Windows Updates Integration LOG File...
    
    -------------------------------------------------------------------------------
    
    
    Writing Windows Updates Integration Log file.
    
    
    -------------------------------------------------------------------------------
    
    Cleaning Up Temporary Files & Folders...
    
    -------------------------------------------------------------------------------
    
    
    Cleaning Up Windows Updates Temporary folder.
    
    
    -------------------------------------------------------------------------------
    
    ####Finished Integrating Windows Updates#######################################
    
    -------------------------------------------------------------------------------
    
    
    ===============================================================================
    
    
    Press any key to continue . . .

    However, the WHD does not seem to properly recognize DU .cab file, the CU .cab and .psf files, nor the CU .msu file.
     
  7. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,770
    3,601
    60
    #22547 inTerActionVRI, Apr 24, 2022
    Last edited: Apr 24, 2022
    @MSMG,

    I optimized that scheme for recognition of the options that can be removed in each Image Index, regardless of identifying the editions of each index.
    The scheme only makes the comparison between user selection and options made by reading through "Toolkithelper" Help "/?" command.

    I used this to automatically display only the options available for the image, so you do not even need to be placed many conditionings for ImageBuild and SelectedSourceOS.

    Code:
               set Components=
               for /f "skip=6 eol== tokens=1 delims=- " %%# in ('%ToolKitHelper% "%InstallMount%\%%i" /?') do (
                   if "%%#" neq "Internet" if "%%#" neq "Multimedia" if "%%#" neq "Network" if "%%#" neq "Privacy" if "%%#" neq "Remoting" if "%%#" neq "System" if "%%#" neq "Windows" if "%%#" neq "Group" if "%%#" neq "SystemApps" if "%%#" neq "WindowsApps" if "%%#" neq "AllComponents" (
                       if "!C_%%#!" equ "-" if "%%#" neq "ManualSetup" (
                           set "Components=!Components!;%%#"
                       )
                   )
               )
               set "Components=!Components:~1!"
    
               :: Removing Windows Components
               echo.-------------------------------------------------------------------------------
               echo.Removing the Chosen Component^(s^) Package^(s^)...
               echo.-------------------------------------------------------------------------------
               echo.
               "%ToolkitHelper%" "%InstallMount%\%%i" "!Components!"
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. kusosaito

    kusosaito MDL Junior Member

    Nov 14, 2018
    59
    6
    0
    @MSMG , hi there
    do you plan to add the ability to completely cut / disable from the image - need for OS to have SecureBoot and TPM 2.0?
    I just see that custom OS builds begun to appear with this cut
     
  9. bala1

    bala1 MDL Member

    May 2, 2015
    179
    150
    10
    #22550 bala1, Apr 24, 2022
    Last edited: Apr 25, 2022
    Already have a solution for Windows 11Build 22000 651 "without TPM" ??
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,770
    3,601
    60
    In Portuguese, talk to me, by Private Message - PM.
    Here in English only.

    I put to install in my Intel Atom with 2GB of RAM and is installing.

    You applied the Tweak "Bypass - Windows 11 Checking Hardware Requirements"?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,770
    3,601
    60
    @MSMG,

    Can you take a look at this modification?

    from:
    Code:
    ::-------------------------------------------------------------------------------------------
    :: Function to List All the Disks and Volumes
    ::-------------------------------------------------------------------------------------------
    :ListDisks
    
    set "DiskTemp=C:"
    call :RemoveFile "%DiskTemp%\DiskList.txt"
    call :RemoveFile "%DiskTemp%\DiskList1.txt"
    
    echo.list volume>> "%DiskTemp%\DiskList.txt"
    diskpart /s "%DiskTemp%\DiskList.txt" >> "%DiskTemp%\DiskList1.txt"
    call :RemoveFile "%DiskTemp%\DiskList.txt"
    echo.>> "%DiskTemp%\DiskList.txt"
    
    echo.===============================================================================>> "%DiskTemp%\DiskList.txt"
    if "%HostLanguage%" equ "en-US" echo.  Volume #  Letter Label      file Sys Type         Size    Status     Info>> "%DiskTemp%\DiskList.txt"
    if "%HostLanguage%" equ "fr-FR" echo.  N# volume   Ltr  Nom          Fs     Type        Taille   Statut     Info>> "%DiskTemp%\DiskList.txt"
    if "%HostLanguage%" equ "zh-CN" echo.  卷 #      盘符   标签       文件系统  类型        大小    状态       信息>> "%DiskTemp%\DiskList.txt"
    echo.------------------------------------------------------------------------------->> "%DiskTemp%\DiskList.txt"
    if "%HostLanguage%" equ "en-US" findstr "Removable" "%DiskTemp%\DiskList1.txt" >> "%DiskTemp%\DiskList.txt"
    if "%HostLanguage%" equ "fr-FR" findstr "Amovible" "%DiskTemp%\DiskList1.txt" >> "%DiskTemp%\DiskList.txt"
    if "%HostLanguage%" equ "zh-CN" findstr "可移动" "%DiskTemp%\DiskList1.txt" >> "%DiskTemp%\DiskList.txt"
    echo.===============================================================================>> "%DiskTemp%\DiskList.txt"
    
    type "%DiskTemp%\DiskList.txt"
    call :RemoveFile "%DiskTemp%\DiskList.txt"
    call :RemoveFile "%DiskTemp%\DiskList1.txt"
    echo.
    
    goto :eof
    ::-------------------------------------------------------------------------------------------
    
    to:

    In "Portuguese", the "Removível" word is not found by Findstr Command.
    But for several Latin languages it should work by reducing the "Removable" word to "Remov" for findstr work.
    Code:
    ::-------------------------------------------------------------------------------------------
    :: Function to List Removable Disks and Volumes
    ::-------------------------------------------------------------------------------------------
    :ListDisks
    
    echo.
    echo.===============================================================================
    echo.DiskPart.exe LIST VOLUME command - for listing Removable USB Flash Devices.
    echo.-------------------------------------------------------------------------------
    for /F "tokens=*" %%# in ('^(echo.LIST VOLUME^) ^| DiskPart.exe ^| findstr /I "Stat 状态 --- Remov Amovible 可移动" ^| findstr /I /V "DISKPART"') do echo.%%#
    echo.===============================================================================
    echo.
    
    goto :EOF
    ::-------------------------------------------------------------------------------------------
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. bala1

    bala1 MDL Member

    May 2, 2015
    179
    150
    10

    I haven't tested it yet, but I will test it tonight to see how it goes. Thank's
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. Feartamixg

    Feartamixg MDL Addicted

    May 15, 2016
    786
    631
    30
    Anybody having issues setting Windows Photo Viewer as the default to open image files? Even though I set this in the ToolKit, I need to set it again in Windows 10. With Windows 11 this is harder to do than 10, hence me raising the issue now.
     
  14. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,770
    3,601
    60
    @正义羊,

    Can you please take a look and test, too?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,770
    3,601
    60
    Do you apply, in the Customize Menu the "Remove Default Inbox Apps Association XML" option?
    I believe it's that.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. 正义羊

    正义羊 MDL Senior Member

    Feb 21, 2016
    260
    160
    10
    OK. Chinese not a Latin Language. SO I WILL TAKE THIS TEXT.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. 正义羊

    正义羊 MDL Senior Member

    Feb 21, 2016
    260
    160
    10
    @inTerActionVRI , I tried custom version of Toolkit, I see this:

    Code:
    ===============================================================================
                         MSMG Toolkit - Format USB Flash Drive
    ===============================================================================
    
    -------------------------------------------------------------------------------
    ####Starting Formatting USB Flash Drive########################################
    -------------------------------------------------------------------------------
    
    -------------------------------------------------------------------------------
    ####Getting USB Flash Drive Options############################################
    -------------------------------------------------------------------------------
    
    Listing Available USB Flash Drives...
    
    ===============================================================================
    -------------------------------------------------------------------------------
    ===============================================================================
    
    Enter USB Flash Drive Letter :
    
    This is trying Format USB Flash Drive founction. Other about USB Flash Drive founctions maybe like this.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,770
    3,601
    60
    #22559 inTerActionVRI, Apr 26, 2022
    Last edited: May 3, 2022
    @MSMG,

    from:
    Code:
                   for /f %%i in ('"dir /s /b /ad "%BootMount%\%%i\Windows\CbsTemp\*"" 2^>nul') do (call :RemoveFolder %%i)
                   del /s /f /q "%BootMount%\%%i\Windows\CbsTemp\*" >nul 2>&1
    
    to:
    Code:
                   for /f %%f in ('dir /B /AD /OG "%BootMount%\%%i\Windows\CbsTemp\*"" 2^>nul') do (call :RemoveFolder "%%~f")
                   del /s /f /q "%BootMount%\%%i\Windows\CbsTemp\*" >nul 2>&1
    
    or to:
    Code:
                   for /f %%f in ('dir /B /AD /OG "%BootMount%\%%i\Windows\CbsTemp\*"" 2^>nul') do (call :RemoveFolder "%%~f")
                   call :RemoveFile "%BootMount%\%%i\Windows\CbsTemp\*" >nul 2>&1
    


    from:
    Code:
                   for /f %%i in ('"dir /s /b /ad "%InstallMount%\%%i\Windows\CbsTemp\*"" 2^>nul') do (call :RemoveFolder %%i)
                   del /s /f /q "%InstallMount%\%%i\Windows\CbsTemp\*" >nul 2>&1
    
    to:
    Code:
                   for /f %%f in ('dir /B /AD /OG "%InstallMount%\%%i\Windows\CbsTemp\*"" 2^>nul') do (call :RemoveFolder "%%~f")
                   del /s /f /q "%InstallMount%\%%i\Windows\CbsTemp\*" >nul 2>&1
    
    or to:
    Code:
                   for /f %%f in ('dir /B /AD /OG "%InstallMount%\%%i\Windows\CbsTemp\*"" 2^>nul') do (call :RemoveFolder "%%~f")
                   call :RemoveFile "%InstallMount%\%%i\Windows\CbsTemp\*" >nul 2>&1
    


    from:
    Code:
    if exist "%BootMount%\%%i\Windows\WinSxS\Backup\*.*" del /f /q "%BootMount%\Windows\WinSxS\Backup\*.*" >nul 2>&1
    
    to:
    Code:
    if exist "%BootMount%\%%i\Windows\WinSxS\Backup\*.*" del /f /q "%BootMount%\%%i\Windows\WinSxS\Backup\*.*" >nul 2>&1
    
    or to:
    Code:
    call :RemoveFile "%BootMount%\%%i\Windows\WinSxS\Backup\*.*" >nul 2>&1
    
    Than we could optimize the SaveSource Cleaning up folders code using the call :RemoveFile
    Like this:
    Code:
    if %errorlevel% equ 1 (
        echo.
        echo.-------------------------------------------------------------------------------
        echo.Cleaning Up Image...
        echo.-------------------------------------------------------------------------------
        echo.
        echo.Cleaning Up temporary and log files or folders...
    
        :: Performing [boot.wim, Index : 1 and 2] Image Windows folder cleanup
        if "%IsBootImageSelected%" equ "Yes" (
            for /l %%i in (1, 1, 2) do (
                if exist "%BootMount%\%%i\Windows\CbsTemp\*" (
                    for /f %%f in ('dir /B /AD /OG "%BootMount%\%%i\Windows\CbsTemp\*" 2^>nul') do (
                        call :RemoveFolder "%%~f"
                    )
                )
                for %%f in (
                    "%WinReMount%\Windows\CbsTemp\*"
                    "%WinReMount%\Windows\WinSxS\Temp\TransformerRollbackData\*"
                ) do (
                    call :RemoveFile "%%f", /S
                )
     
                for %%f in (
                    "%BootMount%\%%i\Users\Default\*.LOG1"
                    "%BootMount%\%%i\Users\Default\*.LOG2"
                    "%BootMount%\%%i\Users\Default\*.TM.blf"
                    "%BootMount%\%%i\Users\Default\*.regtrans-ms"
                    "%BootMount%\%%i\Windows\inf\*.log"
                    "%BootMount%\%%i\Windows\System32\config\*.LOG1"
                    "%BootMount%\%%i\Windows\System32\config\*.LOG2"
                    "%BootMount%\%%i\Windows\System32\config\*.TM.blf"
                    "%BootMount%\%%i\Windows\System32\config\*.regtrans-ms"
                    "%BootMount%\%%i\Windows\System32\SMI\Store\Machine\*.LOG1"
                    "%BootMount%\%%i\Windows\System32\SMI\Store\Machine\*.LOG2"
                    "%BootMount%\%%i\Windows\System32\SMI\Store\Machine\*.TM.blf"
                    "%BootMount%\%%i\Windows\System32\SMI\Store\Machine\*.regtrans-ms"
                    "%BootMount%\%%i\Windows\WinSxS\Backup\*"
                    "%BootMount%\%%i\Windows\WinSxS\ManifestCache\*.bin"
                    "%BootMount%\%%i\Windows\WinSxS\Temp\PendingDeletes\*"
                ) do (
                    call :RemoveFile "%%f"
                )
            )
        )
    
        :: Performing [WinRE.wim, Index : !SpecifiedSourceIndex!] Image Windows folder cleanup
        if "%IsRecoveryImageSelected%" equ "Yes" (
            if exist "%WinReMount%\Windows\CbsTemp\*" (
                for /f %%f in ('dir /B /AD /OG "%WinReMount%\Windows\CbsTemp\*" 2^>nul') do (
                    call :RemoveFolder "%%~f"
                )
            )
            for %%f in (
                "%WinReMount%\Windows\CbsTemp\*"
                "%WinReMount%\Windows\WinSxS\Temp\TransformerRollbackData\*"
            ) do (
                call :RemoveFile "%%f", /S
            )
    
            for %%f in (
                "%WinReMount%\Users\Default\*.LOG1"
                "%WinReMount%\Users\Default\*.LOG2"
                "%WinReMount%\Users\Default\*.TM.blf"
                "%WinReMount%\Users\Default\*.regtrans-ms"
                "%WinReMount%\Windows\inf\*.log"
                "%WinReMount%\Windows\System32\config\*.LOG1"
                "%WinReMount%\Windows\System32\config\*.LOG2"
                "%WinReMount%\Windows\System32\config\*.TM.blf"
                "%WinReMount%\Windows\System32\config\*.regtrans-ms"
                "%WinReMount%\Windows\System32\SMI\Store\Machine\*.LOG1"
                "%WinReMount%\Windows\System32\SMI\Store\Machine\*.LOG2"
                "%WinReMount%\Windows\System32\SMI\Store\Machine\*.TM.blf"
                "%WinReMount%\Windows\System32\SMI\Store\Machine\*.regtrans-ms"
                "%WinReMount%\Windows\WinSxS\Backup\*"
                "%WinReMount%\Windows\WinSxS\ManifestCache\*.bin"
                "%WinReMount%\Windows\WinSxS\Temp\PendingDeletes\*"
            ) do (
                call :RemoveFile "%%f"
            )
        )
    
        :: Performing [install.wim] Image Windows folder cleanup
        for %%i in (!ImageIndexNo!) do (
            if exist "%InstallMount%\%%i\" (
                for %%f in (
                    "%InstallMount%\%%i\$RECYCLE.BIN"
                    "%InstallMount%\%%i\PerfLogs"
                ) do (
                    call :RemoveFolder "%%~f"
                )
    
                if exist "%InstallMount%\%%i\Windows\CbsTemp\*" (
                    for /f %%f in ('dir /B /AD /OG "%InstallMount%\%%i\Windows\CbsTemp\*" 2^>nul') do (
                        call :RemoveFolder "%%~f"
                    )
                )
                for %%f in (
                    "%WinReMount%\Windows\CbsTemp\*"
                    "%WinReMount%\Windows\WinSxS\Temp\TransformerRollbackData\*"
                ) do (
                    call :RemoveFile "%%f", /S
                )
    
                for %%f in (
                    "%InstallMount%\%%i\Users\Default\*.LOG1"
                    "%InstallMount%\%%i\Users\Default\*.LOG2"
                    "%InstallMount%\%%i\Users\Default\*.TM.blf"
                    "%InstallMount%\%%i\Users\Default\*.regtrans-ms"
                    "%InstallMount%\%%i\Windows\inf\*.log"
                    "%InstallMount%\%%i\Windows\System32\config\*.LOG1"
                    "%InstallMount%\%%i\Windows\System32\config\*.LOG2"
                    "%InstallMount%\%%i\Windows\System32\config\*.TM.blf"
                    "%InstallMount%\%%i\Windows\System32\config\*.regtrans-ms"
                    "%InstallMount%\%%i\Windows\System32\SMI\Store\Machine\*.LOG1"
                    "%InstallMount%\%%i\Windows\System32\SMI\Store\Machine\*.LOG2"
                    "%InstallMount%\%%i\Windows\System32\SMI\Store\Machine\*.TM.blf"
                    "%InstallMount%\%%i\Windows\System32\SMI\Store\Machine\*.regtrans-ms"
                    "%InstallMount%\%%i\Windows\WinSxS\Backup\*"
                    "%InstallMount%\%%i\Windows\WinSxS\ManifestCache\*.bin"
                    "%InstallMount%\%%i\Windows\WinSxS\Temp\PendingDeletes\*"
                ) do (
                    call :RemoveFile "%%f"
                )
            )
        )
        echo.
        echo.Finished Cleaning Up Image.
        echo.
    )
    


    Because of the use of the del /S argument in the following command:
    call :RemoveFile "%%f", /S
    It is necessary to improve the label :RemoveFile.

    from:
    Code:
    ::-------------------------------------------------------------------------------------------
    :: Function to delete a file(s)
    :: Input Parameters [ %~1 : Filename ]
    ::-------------------------------------------------------------------------------------------
    :RemoveFile
    
    if exist "%~1" del /F /Q "%~1" >nul
    
    goto :EOF
    ::-------------------------------------------------------------------------------------------
    
    to:
    Code:
    ::-------------------------------------------------------------------------------------------
    :: Function to delete a file(s)
    :: Input Parameters [ %~1 : Filename, %~2 : /S parameter ]
    ::-------------------------------------------------------------------------------------------
    :RemoveFile
    
    if exist "%~1" del %~2 /F /Q "%~1" >nul
    
    goto :EOF
    ::-------------------------------------------------------------------------------------------
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,770
    3,601
    60
    #22560 inTerActionVRI, Apr 26, 2022
    Last edited: Apr 26, 2022
    But this code I put for testing should be added by replacing the present code within "Toolkit.cmd" or "Customtoolkit.cmd"

    This customtoolkit that is available for download, is the code that does not work for Latin Languages as well.

    So you can test that code on Toolkit as well.
    I've changed the Custom Code here to work in your language and mine.
    But I want to know if this optimization, which is looking for the words in Chinese, will work for you too.

    This should search and display lines with these strings:
    I change "Status" to "Stat" to bring French results with one word.
    I change "Removable" to "Remov" to bring Latin Results results with one word.
    --- to bring the line from the LISTVOLUME command.
    And I put the Chinese words
    Code:
    Stat
    状态
    ---
    Remov
    Amovible
    可移动
    
    Could you do this test?
    Just replace the codes I put in that post.

    Here should show the list of USB devices inserted on the computer.

    Thnks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...