Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSI for Visual C++ 2015

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.

like image 730
sergman Avatar asked Sep 28 '16 18:09

sergman


2 Answers

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.

like image 187
Martin Ba Avatar answered Sep 19 '22 20:09

Martin Ba


I looked for a solution for that, too but couldn't find a way.

I just deploy it with powershell with silent switch like this:

& "\\MyServer\path\vc_redist.x86.exe" /q /norestart | Out-Null
like image 31
Musa Avatar answered Sep 23 '22 20:09

Musa