MSMG ToolKit

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

  1. sergey130270

    sergey130270 MDL Member

    May 15, 2014
    103
    13
    10

    The specified file cannot be found.
    File not found: *
    Files copied: 0.
    File not found: *
    Files copied: 0.
    File not found: *
    Files copied: 0.
    C:\Win\Integrator10\Addons\amd64\Temp\vcredist_x64_SxS_Win810\Files\Program Files\Common Files\microsoft shared\VC\msdia90.dll
    C:\Win\Integrator10\Addons\amd64\Temp\vcredist_x64_SxS_Win810\Files\Program Files (x86)\Common Files\microsoft shared\VC\msdia80.dll
    C:\Win\Integrator10\Addons\amd64\Temp\vcredist_x64_SxS_Win810\Files\Program Files (x86)\Common Files\microsoft shared\VC\msdia90.dll
    C:\Win\Integrator10\Addons\amd64\Temp\vcredist_x64_SxS_Win810\Files\Program Files (x86)\Common Files\microsoft shared\VC\amd64\msdia80.dll
    C:\Win\Integrator10\Addons\amd64\Temp\vcredist_x64_SxS_Win810\Files\Windows\Installer\466c6.msi
    C:\Win\Integrator10\Addons\amd64\Temp\vcredist_x64_SxS_Win810\Files\Windows\Installer\466d0.msi
    C:\Win\Integrator10\Addons\amd64\Temp\vcredist_x64_SxS_Win810\Files\Windows\Installer\466da.msi
    C:\Win\Integrator10\Addons\amd64\Temp\vcredist_x64_SxS_Win810\Files\Windows\Installer\466e4.msi
    C:\Win\Integrator10\Addons\amd64\Temp\vcredist_x64_SxS_Win810\Files\Windows\Installer\SourceHash{5FCE6D76-F5DC-37AB-B2B8-22AB8CEDB1D4}
    C:\Win\Integrator10\Addons\amd64\Temp\vcredist_x64_SxS_Win810\Files\Windows\Installer\SourceHash{710f4c1c-cc18-4c49-8cbf-51240c89a1a2}
    C:\Win\Integrator10\Addons\amd64\Temp\vcredist_x64_SxS_Win810\Files\Windows\Installer\SourceHash{9BE518E6-ECC6-35A9-88E4-87755C07200F}
    C:\Win\Integrator10\Addons\amd64\Temp\vcredist_x64_SxS_Win810\Files\Windows\Installer\SourceHash{ad8a2fa1-06e7-4b0d-927d-6e54b3d31028}
    C:\Win\Integrator10\Addons\amd64\Temp\vcredist_x64_SxS_Win810\Files\Windows\Installer\{5FCE6D76-F5DC-37AB-B2B8-22AB8CEDB1D4}\DisplayIcon
    C:\Win\Integrator10\Addons\amd64\Temp\vcredist_x64_SxS_Win810\Files\Windows\Installer\{710f4c1c-cc18-4c49-8cbf-51240c89a1a2}\DisplayIcon
    C:\Win\Integrator10\Addons\amd64\Temp\vcredist_x64_SxS_Win810\Files\Windows\Installer\{9BE518E6-ECC6-35A9-88E4-87755C07200F}\DisplayIcon
    C:\Win\Integrator10\Addons\amd64\Temp\vcredist_x64_SxS_Win810\Files\Windows\Installer\{ad8a2fa1-06e7-4b0d-927d-6e54b3d31028}\DisplayIcon
    Access denied
    Unable to create directory: C:\Win\Integrator10\Mount\Windows\WinSxS
     
  2. ingviowarr

    ingviowarr MDL Member

    Dec 14, 2009
    210
    139
    10
    @MSMG

    What is always annoing for me and my feedback how to improve UI.

    1) Switch "Press any key..." to "Enter" only.
    Why? When I want to copy the output info (incl. for you to show / copy the errors) and want press Ctrl+A (to Select all text), it immediatly closed and I always loosing the screen.
    (Forget always about this thing, very unfriendly)

    2) Always back to PREVIOUS menu instead of MAIN.
    Why? To proceed faster. To do everything inside the chosen section, then just press [X] at the end and go to the next part.
    At the present logic I need walk around the same tree 10 times.
     
  3. zero cool root

    zero cool root MDL Senior Member

    Jun 17, 2011
    256
    59
    10
    @MSMG

    Where do we find EdgeChromium.cab Update..??
     
  4. ingviowarr

    ingviowarr MDL Member

    Dec 14, 2009
    210
    139
    10
    @sergey130270

    Just my 2 cents from my experience about MS Visual C++

    I never had an idea to integrate MS Visual C++ into the image.
    Why? These libraries update often, so there is no need for me put this into ISO.

    I'm using smart all-in-one installer on LIVE system with very handy hacks to keep all bundles updated (in-place) + smart hack that prevents a chaos with big amount of packages or with app stupid attempts to install the same or even old versions.
    I mean such all-in-one bundle is self-protected from damage/reinstalling from 3-rd party apps.

    Search over Internet this one I use for years:

    Microsoft Visual C++ 2005-2019 Redistributable Package [x86/x64] by Lisabon (qazwsxe)
    The most rescent version is dated 11.11.2020 at present time.

    Just install on live system. Later download a new (updated) and install over existing (in-place update) with one click.

    Or send me PM, I'll give you a link, if you want.
     
  5. sergey130270

    sergey130270 MDL Member

    May 15, 2014
    103
    13
    10
    Thanks, but I still want to finalize the script. I hope that someone can help me figure it out.
     
  6. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    4,834
    10,204
    150
    Hope you used NSudo with TrustedInstaller as user and Enabled All Privileges to run the script.

    Do check this script have used xcopy /s for VC, Installer and WinSxS

    Code:
    md "%MOUNT%\Program Files\Common Files\microsoft shared\VC"
    md "%MOUNT%\Program Files (x86)\Common Files\microsoft shared\VC"
    copy "%~dp0Addons\%HostArchitecture%\Temp\vcredist_x64_SxS_Win810\Files\msdia90.dll" "%MOUNT%\Program Files\Common Files\microsoft shared\VC"
    xcopy /s "%~dp0Addons\%HostArchitecture%\Temp\vcredist_x64_SxS_Win810\Files\VC\*.*" "%MOUNT%\Program Files (x86)\Common Files\microsoft shared\VC" /cherkyi
    xcopy /s "%~dp0Addons\%HostArchitecture%\Temp\vcredist_x64_SxS_Win810\Files\Installer\*.*" "%MOUNT%\Windows\Installer" /cherkyi
    xcopy /s "%~dp0Addons\%HostArchitecture%\Temp\vcredist_x64_SxS_Win810\Files\WinSxS\*.*" "%MOUNT%\Windows\WiSxS" /cherkyi
    


     
  7. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    4,834
    10,204
    150
    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.

     
  8. sergey130270

    sergey130270 MDL Member

    May 15, 2014
    103
    13
    10
    #17612 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
     
  9. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    4,834
    10,204
    150
    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.

     
  10. sergey130270

    sergey130270 MDL Member

    May 15, 2014
    103
    13
    10
    #17614 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
     
  11. sergey130270

    sergey130270 MDL Member

    May 15, 2014
    103
    13
    10
    #17615 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"
    )
     
  12. maka213

    maka213 MDL Novice

    Aug 24, 2012
    29
    6
    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.
     
  13. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    4,834
    10,204
    150
    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

     
  14. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    4,834
    10,204
    150
    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

     
  15. digitalized

    digitalized MDL Novice

    Nov 17, 2017
    28
    9
    0