1. Supern00b

    Supern00b MDL Addicted

    Dec 30, 2010
    768
    560
    30
    You have to use start.cmd and use short path.

    Cheers.
     
  2. Yanta

    Yanta MDL Senior Member

    May 21, 2017
    491
    284
    10
    I am contemplating upgrading my Win2012 R2 server to 2019.
    I see that the tool kit only had "Remove by package list" option, and I find the Windows 10 removepkgslist.txt file on the toolkit folder.
    Does this list apply to Windows 2019 Server?
    It doesn't list any dependencies so is there a list of dependencies anywhere, or are there none?
    I am using the 17763.1 server iso.
     
  3. zero cool root

    zero cool root MDL Senior Member

    Jun 17, 2011
    391
    162
    10
  4. Tiger-1

    Tiger-1 MDL Guru

    Oct 18, 2014
    8,326
    11,605
    270
    Hmm for example C: \ Toolkit v11.5 :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,627
    210
    Here's the code to clean-up the dism mounted registry hives when the script is terminated while processing packages.

    Code:
    for /f "tokens=* delims=" %%a in ('reg query "HKLM" ^| findstr "{"') do (
        reg unload "HKLM\%%a" >nul 2>&1
    )
    
     
  6. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,627
    210
    There's no direct command for that, you may need to manually identify the drivers and extract them.

     
  7. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,627
    210
    You can use the Remove Windows Components using Package list menu (DISM Method).

    Get the server packages list by using the command

    Code:
    DISM /Image:<Mount-Folder> /Get-Packages /Format:Table
    
    And, then add the required entries to RemovePkgsList.txt

     
  8. Yanta

    Yanta MDL Senior Member

    May 21, 2017
    491
    284
    10
    I used the list you had in the bin folder. Just took out a couple of things I wanted to keep. I did the DISM method.

    Windows Security still seems to be installed (Or just the SecHealthUI?), and i can't disable the diagnostic data - Every time I set it to Basic it resets to Enhanced.

    I guess there were no dependencies, as everything seems to be working ok.
     
  9. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,627
    210
    Yes SecHealthUI is a System App which can't be removed using DISM.exe, If I do get time then will add support for Server editions too.

     
  10. sergey130270

    sergey130270 MDL Senior Member

    May 15, 2014
    299
    395
    10
    Hello dear friend! And one more request, can you help? Screw this code into this script:

    @echo off

    COLOR 1F

    TITLE Windows 7 Integrator Clean up script
    CLS

    set incorrectPath=0

    echo "%~dp0%" | findstr "(" >nul 2>&1
    if "%ERRORLEVEL%"=="0" set incorrectPath=1
    echo "%~dp0%" | findstr ")" >nul 2>&1
    if "%ERRORLEVEL%"=="0" set incorrectPath=1

    if not "%incorrectPath%"=="0" (
    ECHO.
    ECHO.
    ECHO ================================================================
    ECHO Please copy and run script from Desktop or another directory!
    ECHO ================================================================
    ECHO.
    PAUSE >NUL
    goto end
    )

    If exist "%WinDir%\SysWOW64" (
    SET "Arch=x64"
    ) else (
    SET "Arch=x86"
    )

    SET "PF=%ProgramFiles%"
    IF not "%ProgramFiles(x86)%"=="" SET "PF=%ProgramFiles(x86)%"

    ECHO.
    ECHO.
    ECHO ================================================================
    ECHO Unmounting mounted registry keys...
    ECHO ================================================================
    timeout /t 5 /NOBREAK >nul
    for /f "tokens=* delims=" %%a in ('reg query "HKLM" ^| findstr "{"') do (
    reg unload "HKLM\%%a"
    )

    reg unload HKLM\TK_DEFAULT >nul 2>&1
    reg unload HKLM\TK_NTUSER >nul 2>&1
    reg unload HKLM\TK_SOFTWARE >nul 2>&1
    reg unload HKLM\TK_SYSTEM >nul 2>&1

    ECHO.
    ECHO.
    ECHO ================================================================
    ECHO Unmounting mounted images...
    ECHO ================================================================
    for /L %%i in (1, 1, 2) do (
    if exist "%~dp0mount\Windows\explorer.exe" (
    "%~dp0tools\%Arch%\DISM\dism.exe" /Unmount-Wim /MountDir:"%~dp0Mount\WinRE" /Discard
    )
    )

    if exist "%~dp0Mount\Windows\explorer.exe" (
    "%~dp0Tools\%Arch%\DISM\Dism.exe" /Unmount-Wim /MountDir:"%~dp0Mount" /Discard
    )

    rd /s /q "%~dp0Mount\WinRE" >nul 2>&1
    rd /q /s "%~dp0Mount" >nul 2>&1
    "%~dp0Tools\%Arch%\DISM\Dism.exe" /Cleanup-Mountpoints

    ECHO.
    ECHO.
    ECHO All done!
    ECHO.
    ECHO.
    ECHO Press any key to end the script.
    ECHO.

    PAUSE >NUL

    :End
     
  11. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,627
    210
    You have already added the code in your script, what error is it giving?

    Code:
    for /f "tokens=* delims=" %%a in ('reg query "HKLM" ^| findstr "{"') do (
        reg unload "HKLM\%%a" nul 2>&1
    )
    
    Do add this line just after @echo off

    Code:
    setlocal EnableExtensions EnableDelayedExpansion
    
    And this one at the last before :End

    Code:
    endlocal EnableExtensions EnableDelayedExpansion
    
     
  12. sergey130270

    sergey130270 MDL Senior Member

    May 15, 2014
    299
    395
    10
    ERRORS

    ================================================================
    Unmounting mounted registry keys...
    ================================================================
    Ошибка: Параметр задан неверно.
    Ошибка: Параметр задан неверно.
    Ошибка: Параметр задан неверно.
    Ошибка: Параметр задан неверно.
    Ошибка: Параметр задан неверно.
    Ошибка: Параметр задан неверно.
    Ошибка: Параметр задан неверно.
    Ошибка: Параметр задан неверно.
    Ошибка: Параметр задан неверно.


    ================================================================
    Unmounting mounted images...
    ================================================================

    Deployment Image Servicing and Management tool
    Version: 10.0.20339.2

    Cleaning up image
    Scanning drive C for stale files
    Scanning drive D for stale files
    The operation completed successfully.


    All done


    Press any key to end the script.
     
  13. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,627
    210
    #19555 MSMG, Jun 13, 2021
    Last edited: Jun 13, 2021
    (OP)
    Will check and update.

    Edit: Corrected the code now

    Code:
    for /f "tokens=* delims=" %%a in ('reg query "HKLM" ^| findstr "{"') do (
    reg unload %%a >nul 2>&1
    )
    
     
  14. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,627
    210
    #19556 MSMG, Jun 13, 2021
    Last edited: Jun 13, 2021
    (OP)
    @Feartamixg
    @Supern00b
    @graver.x

    Based on my findings, the folder ACL permission for Program Files, Program Files (x86), Windows and other system folders/files do change for Windows 7, Windows 8.1, Windows 10. Also for some OS the folder ACL permission differ from offline and online images.

    I'm not sure if these differences are the cause for duplicate folder permission in SFC/CBS logs, the SFC ghost error is due to the /Cleanup-Image (Only for v2004 and above images)

    Have updated few packs based on the offline install.wim folder permissions for Windows 10, do check and see if it works. (DirectX9c, Games, VCRuntime, Win32Calc)

    Creating packs with current DISM image based ESD format takes more time due to the variations in the folder permissions, so am planning to use direct copy/extract method for packs in future.
     
  15. roedel

    roedel MDL Junior Member

    Jun 3, 2010
    82
    58
    0
    Thank you for the new version

    I´ve found a little typo

    Line 17920 "echo. [D] Hide Taskbar News & Interests"
    should be "echo. [D] Hide Taskbar News ^& Interests" I guess
     
  16. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,627
    210
    Yes corrected and will be reuploading it now.

     
  17. Bira

    Bira MDL Senior Member

    Oct 4, 2017
    364
    210
    10
    hello @MSMG

    I think I missed the KB4592510? It seems to be repeated the KB4490628!
     

    Attached Files:

  18. babyboom666

    babyboom666 MDL Novice

    Nov 14, 2010
    37
    16
    0
    Error Apply all tweaks W10

    Line 17937 --> choice /C:ABCDEFGHIJKLMNOX /N /M

    should be --> choice /C:ABCDEFGHIJKLMNO1X /N /M