1. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,770
    3,601
    60
    #22821 inTerActionVRI, Jun 9, 2022
    Last edited: Jun 9, 2022
    Missing this:
    goto :MountSourceIndexes
    Then put the label in that part:
    :: Second part of the script
    :: Mounting installation image
    :MountSourceIndexes

    The changed code, below:
    Code:
    for /f "delims=" %%# in ('dir /b /os %Addons%\*.WA') do (set "addon=%%#"&set "dest=Temp\%%~n#"&call :prepare)
    goto :MountSourceIndexes
    
    :prepare
    if exist "%Addons%\%dest%" (
       if exist "%Addons%\%dest%\Registry\NSudoC.exe" (exit /b) else (rd /s /q "%Addons%\%dest%")
    )
    set /a _c+=1
    echo %_c%/%_t%: %Addons%\Addons\%addon%
    echo.
    "%Tools%\7z.exe" x "%Addons%\%addon%" -o"%Addons%\%dest%" * -r >nul
    if not exist "%Addons%\%dest%\Tasks.txt" rd /s /q "%Addons%\%dest%"&exit /b
    md "%Addons%\%dest%\Registry\"
    copy /y "%Tools%\NSudo.exe" "%Addons%\%dest%\Registry\" >nul
    copy /y "%Tools%\Integrator.cmd" "%Addons%\%dest%\" >nul
    copy /y "%Tools%\Reg2Wim.cmd" "%Addons%\%dest%\" >nul
    pushd "%Addons%\%dest%\"
    findstr /i ".dll" Tasks.txt >nul && for /f "tokens=1,2 delims=:" %%a in ('findstr /i ".dll" Tasks.txt') do (
       if not exist "Files\%%b" md "Files\%%b"
       move /y "%%a" "Files\%%b\" >nul
    )
    for /f "tokens=1,2 delims=:" %%a in ('findstr /i ":" Tasks.txt ^|findstr /i /v ".dll"') do (
       if not exist "Files\%%b" md "Files\%%b"
       move /y "%%a" "Files\%%b\" >nul
    )
    for /f "delims=" %%# in ('dir /b *.reg') do call Reg2Wim.cmd %%#
    move /y *.reg Registry\ >nul
    del /f /q Reg2Wim.cmd Tasks.txt
    popd
    exit /b
    
    :: Second part of the script
    :: Mounting installation image
    :MountSourceIndexes
    rem SET ImageCount=1
    FOR /F "tokens=2 delims=: " %%i in ('%DISM% /Get-ImageInfo /ImageFile:"%WIM%" ^| findstr /i Index') do (set ImageCount=%%i)
    FOR /L %%i in (1 1 %ImageCount%) do (
       IF EXIST "%InstallMount%\%%i\" rd /q /s "%InstallMount%\%%i"
       IF NOT EXIST "%InstallMount%\%%i\" mkdir "%InstallMount%\%%i"
       %DISM% /Get-ImageInfo /ImageFile:"%WIM%" /index:%%i
       %DISM% /Mount-Image /ImageFile:"%WIM%" /index:%%i /MountDir:"%InstallMount%\%%i"
    )
    
    Retain the exit /b where it was before.

    When the last "call : prepare" is executed, it will goto to next line and will go through "prepare label" again, without any setted variable and will exit the script.
    So, there is needed one line to indicate what to do.
    goto :anywhereinthescript
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. sergey130270

    sergey130270 MDL Senior Member

    May 15, 2014
    299
    395
    10
    You are my savior!!! Everything turned out great. You are a true friend. Thank you very much))))))
     
  3. graver.x

    graver.x MDL Senior Member

    Jan 18, 2020
    349
    486
    10
  4. haris_mdlf69

    haris_mdlf69 MDL Addicted

    Oct 23, 2018
    657
    1,235
    30
  5. graver.x

    graver.x MDL Senior Member

    Jan 18, 2020
    349
    486
    10
  6. kamiloxf

    kamiloxf MDL Novice

    Feb 2, 2016
    5
    2
    0
    Where can I download the EN-US language pack for Windows 10 21H2 to integrate it with the MSMG Toolkit
    Could someone provide a link to the language pack?
     
  7. bala1

    bala1 MDL Member

    May 2, 2015
    179
    150
    10
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. shhnedo

    shhnedo MDL Guru

    Mar 20, 2011
    2,094
    2,865
    90
    Because some people don't like having a separate iso for each language.
     
  9. bala1

    bala1 MDL Member

    May 2, 2015
    179
    150
    10
    I understand, sorry
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. bala1

    bala1 MDL Member

    May 2, 2015
    179
    150
    10
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. bala1

    bala1 MDL Member

    May 2, 2015
    179
    150
    10
    #22836 bala1, Jun 10, 2022
    Last edited: Jun 10, 2022
    Ok, Thanks
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. wbetts1972

    wbetts1972 MDL Novice

    Jan 22, 2021
    3
    0
    0
    Can we get a link to download the toolkit.

    Thanks
     
  13. bala1

    bala1 MDL Member

    May 2, 2015
    179
    150
    10
    #22838 bala1, Jun 10, 2022
    Last edited: Jun 10, 2022
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. bala1

    bala1 MDL Member

    May 2, 2015
    179
    150
    10
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...