[Repack] Visual C++ Redistributable Runtimes [2022-10-19]

Discussion in 'Application Software' started by abbodi1406, Mar 9, 2018.

  1. xrononautis

    xrononautis MDL Member

    Mar 30, 2021
    166
    77
    10
    #701 xrononautis, Jun 3, 2022
    Last edited: Jun 3, 2022
    I made a choice menu for those who are interested. It includes only the basic functions (according to my needs and understanding but feel free to adapt). Btw can somebody point me out how to adapt the script so that the command gets executed at the press of the number without the need of pressing enter after the number? Thank you!
    Code:
    @echo off
    cls
    :start
    ECHO. Choose what version you want to install.
    
    echo 1. Quiet mode. *Only* 2005 package is installed.
    echo 2. Quiet mode. *Only* 2008 package is installed.
    echo 3. Quiet mode. *Only* 2010 package is installed.
    echo 4. Quiet mode. *Only* 2012 package is installed.
    echo 5. Quiet mode. *Only* 2013 package is installed.
    echo 6. Quiet mode. *Only* 2022 package is installed.
    echo 7. Quiet mode. *Only* VSTOR 2010 package is installed.
    echo 8. Quiet mode. *Only* VC++ packages are installed.
    echo 9. Quiet mode. ****Unistall everything****.
    echo 0. Exit without doing anything.
    
    set choice=
    set /p choice=Make a choice!
    if not '%choice%'=='' set choice=%choice:~0,1%
    if '%choice%'=='1' goto VC1
    if '%choice%'=='2' goto VC2
    if '%choice%'=='3' goto VC3
    if '%choice%'=='4' goto VC4
    if '%choice%'=='5' goto VC5
    if '%choice%'=='6' goto VC6
    if '%choice%'=='7' goto VC7
    if '%choice%'=='8' goto VC8
    if '%choice%'=='9' goto VC9
    if '%choice%'=='0' goto End
    
    ECHO "%choice%" is not valid, try again
    ECHO.
    goto start
    
    :VC1
    echo Quiet mode. *Only* 2005 package will be installed.
    for %%i in (*CppRedist_AIO_x86_x64*.exe) do %%i /ai5
    goto Start
    
    :VC2
    echo Quiet mode. *Only* 2008 package will be installed.
    for %%i in (*CppRedist_AIO_x86_x64*.exe) do %%i /ai8
    goto Start
    
    :VC3
    echo Quiet mode. *Only* 2010 package will be installed.
    for %%i in (*CppRedist_AIO_x86_x64*.exe) do %%i /aiX
    goto Start
    
    :VC4
    echo Quiet mode. *Only* 2012 package will be installed.
    for %%i in (*CppRedist_AIO_x86_x64*.exe) do %%i /ai2
    goto Start
    
    :VC5
    echo Quiet mode. *Only* 2013 package will be installed.
    for %%i in (*CppRedist_AIO_x86_x64*.exe) do %%i /ai3
    goto Start
    
    :VC6
    echo Quiet mode. *Only* 2022 package will be installed.
    for %%i in (*CppRedist_AIO_x86_x64*.exe) do %%i /ai9
    goto Start
    
    :VC7
    echo Quiet mode. *Only* VSTOR 2010 package will be installed.
    for %%i in (*CppRedist_AIO_x86_x64*.exe) do %%i /aiT
    goto Start
    
    :VC8
    echo Quiet mode. *Only* VC++ packages will be installed.
    for %%i in (*CppRedist_AIO_x86_x64*.exe) do %%i /aiV
    goto Start
    
    :VC9
    echo Quiet mode. ****Unistalling everything****.
    for %%i in (*CppRedist_AIO_x86_x64*.exe) do %%i /aiU
    goto Start
    
    :end
    
    exit
    

    @echo off
    cls
    :MENU
    Echo Chose 1 to install VC2005
    Echo Chose 2 to install VC2008
    Echo Chose 3 to install VC2010
    Echo Chose 4 to install VC2012
    Echo Chose 5 to install VC2013
    Echo Chose 6 to install VC2022
    Echo Chose 7 to install VSTOR 2010
    Echo Chose 8 to install all runtimes
    Echo Chose 9 to unistall all
    Echo Chose 0 to exit

    CHOICE /C 1234567890 /N /M "YOUR CHOICE ?"
    if %errorlevel%==1 goto:VC2005
    if %errorlevel%==2 goto:VC2008
    if %errorlevel%==3 goto:VC2010
    if %errorlevel%==4 goto:VC2012
    if %errorlevel%==5 goto:VC2013
    if %errorlevel%==6 goto:VC2022
    if %errorlevel%==7 goto:VSTOR2010
    if %errorlevel%==8 goto:VC++
    if %errorlevel%==9 goto:UNISTALL
    if %errorlevel%==10 goto:END
    goto:MENU

    :VC2005
    echo Quiet mode. *Only* 2005 package will be installed.
    for %%i in (*CppRedist_AIO_x86_x64*.exe) do %%i /ai5
    goto MENU

    :VC2008
    echo Quiet mode. *Only* 2008 package will be installed.
    for %%i in (*CppRedist_AIO_x86_x64*.exe) do %%i /ai8
    goto MENU

    :VC2010
    echo Quiet mode. *Only* 2010 package will be installed.
    for %%i in (*CppRedist_AIO_x86_x64*.exe) do %%i /aiX
    goto MENU

    :VC2012
    echo Quiet mode. *Only* 2012 package will be installed.
    for %%i in (*CppRedist_AIO_x86_x64*.exe) do %%i /ai2
    goto MENU

    :VC2013
    echo Quiet mode. *Only* 2013 package will be installed.
    for %%i in (*CppRedist_AIO_x86_x64*.exe) do %%i /ai3
    goto MENU

    :VC2022
    echo Quiet mode. *Only* 2022 package will be installed.
    for %%i in (*CppRedist_AIO_x86_x64*.exe) do %%i /ai9
    goto MENU

    :VSTOR2010
    echo Quiet mode. *Only* VSTOR 2010 package will be installed.
    for %%i in (*CppRedist_AIO_x86_x64*.exe) do %%i /aiT
    goto MENU

    :VC++
    echo Quiet mode. *Only* VC++ packages will be installed.
    for %%i in (*CppRedist_AIO_x86_x64*.exe) do %%i /aiV
    goto MENU

    :UNISTALL
    echo Quiet mode. ****Unistalling everything****.
    for %%i in (*CppRedist_AIO_x86_x64*.exe) do %%i /aiU
    goto MENU

    :end

    exit
     
  2. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    2,175
    2,611
    90
    using Choice command.
    A Demo Code.
    Code:
    :MENU
        CHOICE /C DSICKAUTOREHVXNFMLG /N /M "YOUR CHOICE ?"
        if %errorlevel%==1 goto:DownloadO16Offline
        if %errorlevel%==2 set "createIso=defined"&goto:InstallO16
        if %errorlevel%==3 goto:InstallO16
        if %errorlevel%==4 goto:Convert16Activate
        if %errorlevel%==5 goto:KMSActivation_ACT_WARPER
        if %errorlevel%==6 goto:CheckActivationStatus
        if %errorlevel%==7 goto:ChangeUpdPath
        if %errorlevel%==8 goto:DisableTelemetry
        if %errorlevel%==9 goto:DownloadO16Online
        if %errorlevel%==10 goto:ResetRepair
        if %errorlevel%==11 goto:TheEndIsNear
        if %errorlevel%==12 goto:Scrub
        if %errorlevel%==13 (set logo=LTSC&goto:EnableVisualUI)
        if %errorlevel%==14 (set logo=365&goto:EnableVisualUI)
        if %errorlevel%==15 (set "OnlineInstaller=defined"&goto:InstallO16)
        if %errorlevel%==16 goto:CheckPlease
        if %errorlevel%==17 (set "DloadImg=defined"&goto:DownloadO16Online)
        if %errorlevel%==18 (set "DloadLP=defined"&goto:DownloadO16Online)
        if %errorlevel%==19 goto :GetLatestVersion
        goto:MENU
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. xrononautis

    xrononautis MDL Member

    Mar 30, 2021
    166
    77
    10
    It worked flawlessly! Thank you very much!
     
  4. coleoptere2007

    coleoptere2007 MDL Guru

    Apr 8, 2008
    3,316
    1,937
    120
    #705 coleoptere2007, Jun 24, 2022
    Last edited: Jun 24, 2022
    FYI, playing yesterday with the different switches can lead to problems with installed applications.

    I used switch /aiU - Manual Uninstall mode, remove all detected runtimes to uninstall all with success.

    However when trying to launch Firefox last version I faced an error message "vcruntime140_1.dll is missing".

    First option was to reinstall all runtimes from the pack but it didn't solve anything.
    Second one was to repair/reinstall FireFox and same error.
    Third was to download the file and copy it in MozillaFirefox folder,same issue.
    If you look in MozillaFirefox folder vcruntime140.dll is here so why the application is asking for another version? No answer from my side.
    Finally solved by renaming vcruntime140.dll to vcruntime140_1.dll

    Just sharing this in case some of you would face the same issue (I hope not).
    Nice day.Coleo :)
     
  5. Moudey

    Moudey MDL Novice

    Sep 18, 2007
    11
    28
    0
    Many thanks guys for your tool, good job
     
  6. jorgeapp

    jorgeapp MDL Novice

    Aug 16, 2016
    5
    0
    0
    Thanks for share it!
     
  7. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,819
    15,674
    270
    @abbodi1406
    I'm getting many errors during repack installation on Windows 10 21H2 x64
    Code:
    error 1935. an error occurred during the installation of assembly...
     
  8. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    14,193
    72,554
    340
    - Run complete Uninstall, and reboot
    - Run SFC /SCANNOW
    - Inplace-Upgrade or clean install
     
  9. nasagih

    nasagih MDL Novice

    Dec 14, 2010
    27
    4
    0
    @abbodi1406
    Is it safe to overwrite old version v.0.62.0 with newer one?
     
  10. amajmon

    amajmon MDL Member

    Sep 21, 2012
    245
    106
    10
    Yes it is safe.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...