VisualCppRedist AIO Documentation

repository·master·Indexed 26 days ago

https://github.com/abbodi1406/vcredist

A repack of Microsoft Visual C++ Redistributable Runtimes (2005 through 2026) designed to install multiple versions without original setup bloat. The project provides tools and instructions for building AIO MSI packages using WiX Toolset v3, 7zSfxMod, and VBScripts, as well as guidance on unattended installation switches and managing Add/Remove Programs entries via INF-based overrides.

Tokens
4.5K
Snippets
8
Records
31
Agent score
93%

What's inside VisualCppRedist AIO

  1. Build VC++ 2008 redistributables

    master

    Follow these steps to extract, modify, and perform an administrative installation for VC++ 2008:

    1. Extract the original executables.
    2. Modify the vc_red.msi files using the provided VBScript.
    3. Admin install to create a clean installation directory.
    start /w vcredist_x64.exe /quiet /extract:"%cd%\vc64"
    start /w vcredist_x86.exe /quiet /extract:"%cd%\vc86"
    cscript vc09.vbs vc64\vc_red.msi
    cscript vc09.vbs vc86\vc_red.msi
    start /w msiexec.exe /a vc64\vc_red.msi /quiet TARGETDIR="%cd%\2008\x64"
    start /w msiexec.exe /a vc86\vc_red.msi /quiet TARGETDIR="%cd%\2008\x86"
    rmdir /s /q vc64\ vc86\
  2. Requirements for building VisualCppRedist AIO packages

    master

    To prepare the VisualCppRedist AIO MSI packages, you need the following tools:

    • VBScript files: Used to modify and slim MSI files (originally by dumpydooby, modded by ricktendo64).
    • WiSumInf.vbs: Part of the Windows SDK Windows Installer utility scripts; used to update the MSI summary information stream.
    • WiX Toolset v3: Required to extract VC++ 2012 and later Bootstrappers, and to build MSI files for legacy VB/C runtimes.
    • 7zSfxMod: A modified 7z SFX module used to build the AIO executable installer.
  3. Configure WiX Toolset PATH

    master

    To use WiX binaries easily, add the binaries folder to your PATH environment variable.

    To set globally (System PATH):

    setx PATH "W:\GitHub\dotNetFx4xW7\BIN;%PATH%" /M

    To set for the current Command Prompt session only:

    set "PATH=W:\GitHub\dotNetFx4xW7\BIN;%PATH%"
    setx PATH "W:\GitHub\dotNetFx4xW7\BIN;%PATH%" /M
  4. Build VC++ 2012, 2013, and 2015-2022 redistributables

    master

    These versions use dark.exe (WiX Toolset) for extraction and follow a similar pattern of extracting, modifying specific MSI files in the AttachedContainer\packages directory, and performing an administrative installation.

    # Example for VC++ 2012
    dark.exe vcredist_x64.exe -x "%cd%\vc64"
    dark.exe vcredist_x86.exe -x "%cd%\vc86"
    cscript vc11.vbs vc64\AttachedContainer\packages\vcRuntimeMinimum_amd64\vc_runtimeMinimum_x64.msi
    cscript vc11.vbs vc64\AttachedContainer\packages\vcRuntimeAdditional_amd64\vc_runtimeAdditional_x64.msi
    cscript vc11.vbs vc86\AttachedContainer\packages\vcRuntimeMinimum_x86\vc_runtimeMinimum_x86.msi
    cscript vc11.vbs vc86\AttachedContainer\packages\vcRuntimeAdditional_x86\vc_runtimeAdditional_x86.msi
    start /w msiexec.exe /a vc64\AttachedContainer\packages\vcRuntimeMinimum_amd64\vc_runtimeMinimum_x64.msi /quiet TARGETDIR="%cd%\2012\x64"
    start /w msiexec.exe /a vc64\AttachedContainer\packages\vcRuntimeAdditional_amd64\vc_runtimeAdditional_x64.msi /quiet TARGETDIR="%cd%\2012\x64"
    start /w msiexec.exe /a vc86\AttachedContainer\packages\vcRuntimeMinimum_x86\vc_runtimeMinimum_x86.msi /quiet TARGETDIR="%cd%\2012\x86"
    start /w msiexec.exe /a vc86\AttachedContainer\packages\vcRuntimeAdditional_x86\vc_runtimeAdditional_x86.msi /quiet TARGETDIR="%cd%\2012\x86"
    rmdir /s /q vc64\ vc86\
  5. Manage Visual C++ Runtime entries in Add/Remove Programs

    master

    Starting with v104, the repack uses INF-based overrides to unify and simplify uninstall entries for VC++ Redists 2005 ~ 2026. This provides a cleaner, organized naming scheme in the Windows Add/Remove Programs panel.

    • To hide the original entries and use the unified INF entries: Simply run the installer normally.
    • To restore the original behavior (show original Runtimes entries):
      • Run the repack with the /aiN switch.
      • OR, extract the repack and run ARP.cmd, then choose option 2. Show.
  6. Build VC++ 2005 redistributables

    master

    Follow these steps to extract, modify, and perform an administrative installation for VC++ 2005:

    1. Extract the original executables.
    2. Modify the MSI files using the provided VBScript.
    3. Admin install to create a clean installation directory and remove internal unneeded files.
    start /w vcredist_x64.exe /Q /C /T:"%cd%\vc64"
    start /w vcredist_x86.exe /Q /C /T:"%cd%\vc86"
    cscript vc08.vbs vc64\vcredist.msi
    cscript vc08.vbs vc86\vcredist.msi
    start /w msiexec.exe /a vc64\vcredist.msi /quiet TARGETDIR="%cd%\2005\x64"
    start /w msiexec.exe /a vc86\vcredist.msi /quiet TARGETDIR="%cd%\2005\x86"
    rmdir /s /q vc64\ vc86\
  7. Build VC++ 2010 redistributables

    master

    Follow these steps to extract, modify, and perform an administrative installation for VC++ 2010. This process includes using WiSumInf.vbs to preserve Subject and Comments metadata during the administrative installation and patching with msp_kb2890375.msp.

    start /w vcredist_x64.exe /quiet /extract:"%cd%\tmp"
    robocopy /NJH /NJS tmp\ vc10\x64\ *.cab *.msi *.msp
    rmdir /s /q tmp\
    start /w vcredist_x86.exe /quiet /extract:"%cd%\tmp"
    robocopy /NJH /NJS tmp\ vc10\x86\ *.cab *.msi *.msp
    rmdir /s /q tmp\
    cscript vc10.vbs vc10\x64\vc_red.msi
    cscript vc10.vbs vc10\x86\vc_red.msi
    for /f "tokens=2* delims== " %a in ('cscript WiSumInf.vbs vc10\x64\vc_red.msi ^| findstr /i Subject') do set name="%b"
    for /f "tokens=2* delims== " %a in ('cscript WiSumInf.vbs vc10\x64\vc_red.msi ^| findstr /i Comments') do set desc="%b"
    start /w msiexec.exe /a vc10\x64\vc_red.msi /quiet TARGETDIR="%cd%\vc10\z64"
    start /w msiexec.exe /a vc10\z64\vc_red.msi /quiet TARGETDIR="%cd%\2010\x64" PATCH="%cd%\vc10\x64\msp_kb2890375.msp"
    cscript WiSumInf.vbs vc10\z64\vc_red.msi Subject=%name% Comments=%desc%
    move /y vc10\z64\vc_red.msi 2010\x64\
    for /f "tokens=2* delims== " %a in ('cscript WiSumInf.vbs vc10\x86\vc_red.msi ^| findstr /i Subject') do set name="%b"
    for /f "tokens=2* delims== " %a in ('cscript WiSumInf.vbs vc10\x86\vc_red.msi ^| findstr /i Comments') do set desc="%b"
    start /w msiexec.exe /a vc10\x86\vc_red.msi /quiet TARGETDIR="%cd%\vc10\z86"
    start /w msiexec.exe /a vc10\z86\vc_red.msi /quiet TARGETDIR="%cd%\2010\x86" PATCH="%cd%\vc10\x86\msp_kb2890375.msp"
    cscript WiSumInf.vbs vc10\z86\vc_red.msi Subject=%name% Comments=%desc%
    move /y vc10\z86\vc_red.msi 2010\x86\
    rmdir /s /q vc10\
  8. Install VisualCppRedist AIO

    master

    To install the Visual C++ Redistributable runtimes using the AIO repack:

    1. Extract the installer file using 7-zip or WinRar to a short file path.
    2. Run Installer.cmd as an administrator.

    Note: The installation process automatically checks for and removes existing non-compliant Visual C++ Runtimes (including original EXE/MSI setups or older MSI versions) before installing the new ones. If System Restore is active, Microsoft Windows Installer will create a restore point for each MSI package.

  9. Install Visual C++ Redistributable for Windows Vista

    master

    Version 14.32.31332.0 is the last version compatible with Windows Vista. Use the following links to download the appropriate architecture for Vista-based systems:

    https://download.visualstudio.microsoft.com/download/pr/ed95ef9e-da02-4735-9064-bd1f7f69b6ed/CE6593A1520591E7DEA2B93FD03116E3FC3B3821A0525322B0A430FAA6B3C0B4/VC_redist.x64.exe
    https://download.visualstudio.microsoft.com/download/pr/ed95ef9e-da02-4735-9064-bd1f7f69b6ed/CF92A10C62FFAB83B4A2168F5F9A05E5588023890B5C0CC7BA89ED71DA527B0F/VC_redist.x86.exe
    https://download.visualstudio.microsoft.com/download/pr/ed95ef9e-da02-4735-9064-bd1f7f69b6ed/8E126191012691AE22A0D5A89FAC01B59BABC7B680E5D9B65828935FD366E375/VC_redist.arm64.exe
  10. Build Legacy VB/C++ runtimes

    master

    To build the legacy VB/C++ MSI packages:

    1. Download and extract VBCRun.7z.
    2. Use candle.exe and light.exe (WiX Toolset) to build the MSI files for vbcrun.wxs, vcrun.wxs, and vbrun.wxs.
    3. Perform an administrative installation for the resulting MSI files.
    candle.exe vbcrun.wxs
    light.exe vbcrun.wixobj -spdb -sice:ICE09 -dcl:none
    candle.exe vcrun.wxs
    light.exe vcrun.wixobj -spdb -sice:ICE09 -dcl:none
    candle.exe vbrun.wxs
    light.exe vbrun.wixobj -spdb -sice:ICE09 -dcl:none
    start /w msiexec.exe /a vbrun.msi /quiet TARGETDIR="%cd%\vbc"
    start /w msiexec.exe /a vcrun.msi /quiet TARGETDIR="%cd%\vbc"
    start /w msiexec.exe /a vbcrun.msi /quiet TARGETDIR="%cd%\vbc"
  11. Build the VisualCppRedist_AIO installers

    master

    To create the All-in-One (AIO) installers, organize your administrative installation directories and required scripts into an _AIO folder, then execute the provided batch scripts.

    1. Prepare the _AIO directory

    Move the following runtime directories into the _AIO folder:

    • 2005, 2008, 2010, 2012, 2013, 2022, ucrt, vbc, vstor

    Also, include these essential files in _AIO:

    • 7zSfx_x86_x64.cmd
    • 7zSfx_x86only.cmd
    • 7zSfxConfig.txt
    • 7zSfxMod.sfx
    • ARP.cmd
    • Installer.cmd
    • Uninstaller.cmd

    2. Configure 7-Zip path

    The build scripts expect 7z.exe to be located at %ProgramFiles%\7-Zip. If you use a different path or a portable version, you must adjust the path on the 2nd line of the .cmd scripts.

    3. Run the build scripts

    Execute one of the following to generate the installers:

    • 7zSfx_x86_x64.cmd (for x86 and x64 installers)
    • 7zSfx_x86only.cmd (for x86 only)

    Note: The -bso0 switch used in the scripts requires 7-Zip version 15.01 or later.

    7zSfx_x86_x64.cmd
  12. Update Installer.cmd with new runtime versions

    master

    When adding new runtime versions to the AIO package, follow these steps to update the Installer.cmd script:

    1. Obtain ProductCode: Run MSIProductCode.vbs against the new .msi files to retrieve the required ProductCode.
    2. Edit Script: Open Installer.cmd and locate the section around line 180.
    3. Update Versions: Update the file versions for the _verXX variables.
    4. Update Code Variables: Update the corresponding code variables with the new information.
    5. Update SFX Metadata: Use a resource editor to update the File Version and Product Version for 7zSfxMod.sfx to match the latest VC++ 14 version.