1. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,608
    210
    1) There's no direct method to use Enter key in DOS batch programming, the best that can be done is

    echo Press enter key to continue
    set /p input=

    2) This can be done, will implement it.

     
  2. sergey130270

    sergey130270 MDL Senior Member

    May 15, 2014
    272
    288
    10
    #17606 sergey130270, Nov 22, 2020
    Last edited: Nov 22, 2020
    I don’t understand anything, I have already changed the paths and still the files are not copied.


    mkdir "%MOUNT%\Program Files\Common Files\microsoft shared\VC"
    mkdir "%MOUNT%\Program Files (x86)\Common Files\microsoft shared\VC"
    echo.
    echo.Unpacking add-ons
    "%~dp0tools\%HostArchitecture%\7z.exe" x "%~dp0Addons\%HostArchitecture%\*" -o"%~dp0Addons\%HostArchitecture%\Temp\" -r -y
    echo.
    echo Copying files...
    copy "%~dp0Addons\%HostArchitecture%\Temp\vcredist_x64_SxS_Win810\msdia90.dll" "%MOUNT%\Program Files\Common Files\microsoft shared\VC"
    xcopy /s "%~dp0Addons\%HostArchitecture%\Temp\vcredist_x64_SxS_Win810\VC\*" "%MOUNT%\Program Files (x86)\Common Files\microsoft shared\VC" /cherkyi
    xcopy /s "%~dp0Addons\%HostArchitecture%\Temp\vcredist_x64_SxS_Win810\Installer\*" "%MOUNT%\Windows\Installer" /cherkyi
    xcopy /s "%~dp0Addons\%HostArchitecture%\Temp\vcredist_x64_SxS_Win810\WinSxS\*" "%MOUNT%\Windows\WiSxS" /cherkyi


    Copying files...
    Системе не удается найти указанный путь.
    Не найден файл: *
    Скопировано файлов: 0.
    Не найден файл: *
    Скопировано файлов: 0.
    Не найден файл: *
    Скопировано файлов: 0.

    -------------------------------------------------------------------------------
    Converting registry settings files
    -------------------------------------------------------------------------------


    -------------------------------------------------------------------------------
    Applying custom program settings
    -------------------------------------------------------------------------------

    Importing [HKCU_Software.reg] to Image Registry...
    Importing [HKLM_Software.reg] to Image Registry...
    Importing [HKLM_System.reg] to Image Registry...
    Importing [IE11.reg] to Image Registry...
    Importing [OpenInNotepad.reg] to Image Registry...
    Importing [PhotoViewer.reg] to Image Registry...

    -------------------------------------------------------------------------------
    Un-Mounting Image Registry
     
  3. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,608
    210
    Everything seems to be proper, just change this WiSxS to WinSXS in last line.

    Will check myself by downloading the add-on and try the same commands and let you know.

     
  4. sergey130270

    sergey130270 MDL Senior Member

    May 15, 2014
    272
    288
    10
    #17608 sergey130270, Nov 22, 2020
    Last edited: Nov 22, 2020
    I found an error.

    echo.Unpacking add-ons
    "%~dp0tools\%HostArchitecture%\7z.exe" x "%~dp0Addons\%HostArchitecture%\*" -o"%~dp0Addons\%HostArchitecture%\Temp\" -r -y
    echo.
    echo Copying files...
    copy "%~dp0Addons\%HostArchitecture%\Temp\vcredist_x64_SxS_Win810\msdia90.dll" "%MOUNT%\Program Files\Common Files\microsoft shared\VC"
    xcopy /s "%~dp0Addons\%HostArchitecture%\Temp\vcredist_x64_SxS_Win810\VC\*" "%MOUNT%\Program Files (x86)\Common Files\microsoft shared\VC" /cherkyi
    xcopy /s "%~dp0Addons\%HostArchitecture%\Temp\vcredist_x64_SxS_Win810\Installer\*" "%MOUNT%\Windows\Installer" /cherkyi
    xcopy /s "%~dp0Addons\%HostArchitecture%\Temp\vcredist_x64_SxS_Win810\WinSxS\*" "%MOUNT%\Windows\WiSxS" /cherkyi
     
  5. sergey130270

    sergey130270 MDL Senior Member

    May 15, 2014
    272
    288
    10
    #17609 sergey130270, Nov 22, 2020
    Last edited: Nov 22, 2020
    I found an error.
    Thank you very much for your great help. You are a very kind person.

    echo.
    echo.-------------------------------------------------------------------------------
    echo Mount Image Registry
    echo.-------------------------------------------------------------------------------
    echo.
    reg load HKLM\wCOMPONENTS "%MOUNT%\Windows\System32\config\COMPONENTS" >nul
    reg load HKLM\wDEFAULT "%MOUNT%\Windows\System32\config\DEFAULT" >nul
    reg load HKLM\wNTUSER "%MOUNT%\Users\Default\NTUSER.DAT" >nul
    reg load HKLM\wSOFTWARE "%MOUNT%\Windows\System32\config\SOFTWARE" >nul
    reg load HKLM\wSYSTEM "%MOUNT%\Windows\System32\config\SYSTEM" >nul



    mkdir "%MOUNT%\Program Files\Common Files\microsoft shared\VC"
    mkdir "%MOUNT%\Program Files (x86)\Common Files\microsoft shared\VC"
    echo.
    echo Unpacking add-ons vcredist_x64_SxS_Win810.wa
    "%~dp0tools\%HostArchitecture%\7z.exe" x "%~dp0Addons\%HostArchitecture%\*" -o"%~dp0Addons\%HostArchitecture%\Temp\" -r -y
    echo.
    echo Copying files...
    copy "%~dp0Addons\%HostArchitecture%\Temp\msdia90.dll" "%MOUNT%\Program Files\Common Files\microsoft shared\VC"
    xcopy /s "%~dp0Addons\%HostArchitecture%\Temp\VC\*" "%MOUNT%\Program Files (x86)\Common Files\microsoft shared\VC" /cherkyi
    xcopy /s "%~dp0Addons\%HostArchitecture%\Temp\Installer\*" "%MOUNT%\Windows\Installer" /cherkyi
    xcopy /s "%~dp0Addons\%HostArchitecture%\Temp\WinSxS\*" "%MOUNT%\Windows\WiSxS" /cherkyi

    echo.
    echo Converting registry settings files
    mkdir "%~dp0Addons\%HostArchitecture%\RegTemp"
    PowerShell -Executionpolicy Bypass -File "%~dp0tools\%HostArchitecture%\ConvertReg.ps1" "%~dp0Addons\%HostArchitecture%\Temp" "%~dp0Addons\%HostArchitecture%\RegTemp"

    echo.
    echo Applying custom program settings.
    for /f "tokens=*" %%i in ('"dir /b "%~dp0Addons\%HostArchitecture%\RegTemp\*.reg"" 2^>nul') do (
    echo.Importing [%%i] to Image Registry...
    regedit.exe /s REG IMPORT "%~dp0Addons\%HostArchitecture%\RegTemp\%%i"
    )
     
  6. maka213

    maka213 MDL Novice

    Aug 24, 2012
    41
    12
    0

    So then i'm assuming due to the code protections, using lists wouldn't make it any faster? I get it, i really do. Nobody wants their code stolen but with that being said, it's turned what was once a truly great tool into something tedious and time consuming. And to be perfectly honest, no code protections will protect your source code from someone who wants it badly enough. It's unfortunate because this was my go to toolkit for modifying windows images but with CU's restoring stuff that would mean i would have to build a new iso every month and do an in place upgrade. It's just not feasable. Thanks for all your work through the years, it's been quite helpful. Hopefully i'll be able to find a suitable replacement.
     
  7. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,608
    210
    In the current version removing all components in a Category is fixed now.

    Using the list method the Toolkit removal program will load the program only once into memory and then it removes all the components without any delay whereas in individual component removal it needs to be loaded into memory each time which takes more time to load.

    Do have plans to port the code to C/C++ native code for better performance.

    The components returning in Windows 10 v1903/v1909/v2004/v2009 blame it on Microsoft's new Update package format.

    Thanks for your support and feedback, you are free to choose any Tool your are comfortable with, here's some of the alternative tools you can try

    NTLite
    WinReducer
    Optimize-Offline
    WinToolkit
    Blackbird

     
  8. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,608
    210
    I see you are extracting all the addons to same folder, instead it should be extracted to individual folders.

    In the script change WiSxS to WinSxS

     
  9. digitalized

    digitalized MDL Novice

    Nov 17, 2017
    30
    9
    0
    In the process of component removal, the component name is still blank when removing Edge & Edge Dev Tools Client (i.e. it says "Removing "" Package..."):

    no-pkg-name.png

    For this test, I'm not going to integrate anything; only remove Edge & Edge Dev Tools Client.
     
  10. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,608
    210
    If you want to use the remover outside the Toolkit, then the command is

    ToolKitHelper <Image-Mount-Path> <ComponentName>

    or

    ToolKitHelper <Image-Mount-Path> <ComponentName1;ComponentName2;ComponentName3>

    or

    ToolKitHelper <Image-Mount-Path> <PackageList.txt>

    The PackageList.txt should contain the names of the component one per line


    Example

    ToolKitHelper C:\mount Edge

    or

    ToolKitHelper C:\mount Edge;EdgeDevToolsClient

    or

    ToolKitHelper C:\mount PackageList.txt

    The contents of PackageList.txt will be like

    Edge
    EdgeDevToolsClient



     
  11. Tiger-1

    Tiger-1 MDL Guru

    Oct 18, 2014
    7,894
    10,734
    240
    the doors are open...;)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. Zanza-kun

    Zanza-kun MDL Junior Member

    May 28, 2012
    87
    15
    0
    Hi, I lost the function "Safely Remove Hardware" (Control_RunDLL hotplug.dll not work), i remove everything except Windows Defender and smartscreen, its normal ? Thx.