MSI for Visual C++ 2015

sergman picture sergman · Sep 28, 2016 · Viewed 9k times · Source

I need to install redistributable Visual C++ 2015 on three hundred computers in a corporate office. Is there any way to convert EXE to MSI. It would save tons of time.

Answer

Martin Ba picture Martin Ba · Apr 3, 2019

The Visual Studio 2015 and 2017 installers are built with the WiX toolset.

You can extract the contents of these with the dark tool:

+>dir /b vc_*
vc_redist.x64.exe
vc_redist.x86.exe

+>mkdir x64-extracted

+>c:\local\WiX-3.11.1-bin\dark.exe vc_redist.x64.exe -x x64-extracted
Windows Installer XML Toolset Decompiler version 3.11.1.2318
Copyright (c) .NET Foundation and contributors. All rights reserved.

vc_redist.x64.exe

+>cd x64-extracted

+>dir /b /s
....\vcredist-2015\x64-extracted\AttachedContainer
....\vcredist-2015\x64-extracted\UX
....\vcredist-2015\x64-extracted\AttachedContainer\packages
....\vcredist-2015\x64-extracted\AttachedContainer\packages\Patch
....\vcredist-2015\x64-extracted\AttachedContainer\packages\vcRuntimeAdditional_amd64
....\vcredist-2015\x64-extracted\AttachedContainer\packages\vcRuntimeMinimum_amd64
....\vcredist-2015\x64-extracted\AttachedContainer\packages\Patch\x64
....\vcredist-2015\x64-extracted\AttachedContainer\packages\Patch\x86
....\vcredist-2015\x64-extracted\UX
...

+>

This will contain the vc_runtimeMinimum_x64.msi along with a cab1.cab that contains the actual data and the vc_runtimeAdditional_x64.msi along with another cab1.cab with the MFC dlls.

Note that it will also contain a bunch of MSU files (under the ..\Patch\..) subdir, that contain operating system patches for a minimum version of the Universal C Runtime. The UCRT is the part of the C runtime library that is no longer VS version specific, but an OS component.