Extract MSI from Visual C++ 2012 Redistributable

When you download the new bits for the Visual C++ 2012 redistributable – it comes with an .EXE. This .EXE file is very nice for the common end-user, but working as an Configuration Administrator you are taught the hard-life of using MSIs. By providing the SCCM GUI with an MSI you are provided with so much improvement in the deployment process that doing it manually just seems like a lot of hardwork. For example, you get autodetection if the component is placed on the machine already!

For the older versions of Visual C++ 2010 redistributable you could either via a command-line switch or using an extraction tool (such as Winrar) get the msi-file from the package. The new breed of .EXE-file wasn’t so kind to us and there required some work (and a minor challenge) before it gave up the goods.

1. Install the software
2. Review the registry and find the following keys (these examples are for x64);
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A2CB1ACB-94A2-32BA-A15E-7D80319F7589}]

image
As you can see – the install source is; C:\ProgramData\Package Cache\{A2CB1ACB-94A2-32BA-A15E-7D80319F7589}v11.0.50727\packages\vcRuntimeMinimum_amd64\
The name is Microsoft Visual C++ 2012 x64 Minimum Runtime.
Minimum ? Sounds like there could be more…

Looking at; HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AC53FC8B-EE18-3F9C-9B59-60937D0B182C}
There is;
image

We can now extract two MSI-files – from the directories;
Additional runtime; C:\ProgramData\Package Cache\{AC53FC8B-EE18-3F9C-9B59-60937D0B182C}v11.0.50727\packages\vcRuntimeAdditional_amd64\

Minimum; C:\ProgramData\Package Cache\{A2CB1ACB-94A2-32BA-A15E-7D80319F7589}v11.0.50727\packages\vcRuntimeMinimum_amd64\

If simply executing the extracted MSIs you get the following;
image
To install this product, please run Setup.exe. For other installation options, see the Installation section of ReadMe.htm.

Simply add the property ADDEPLOY=1 to bypass the check!

27 thoughts on “Extract MSI from Visual C++ 2012 Redistributable

  1. HW Reply

    Many thanks for your Guide to install the Version 2012 of C++ Restist.
    But i got a little Problem. I got now 2 MSI Files. Which of these 2 i have to install?

    I add the Property ADDEPLOY=1 so the Warning to start Setup.exe doesnt come.

    But if i start to install this MSI by Hand it just show a little Installationbar and nothing more, there is no Software installed under Software/Programs or any Registrykey sets. Is there something i have to do with the Minimum+Additional MSI+Cab Files?

    Best Regards

    • nickekallen Post authorReply

      Hello,

      Both of them
      It should at least show up under the registry keys for uninstall – have you tried logging the install and see if it fails / succeds?

  2. Tirelibirefe Reply

    Actually I didn’t understand. Where will I put ADDEPLOY=1 ??
    My purpose is “not to run setup.exe” as I want to deploy it via sccm 2012.
    Also what is this “minimum thing”?

  3. Anwar Mahmood Reply

    You can run

    vcredist_x86.exe /?

    to obtain a list of command line options.

    To perform a silent install without reboot, do

    vcredist_x86.exe /install /quiet /norestart

  4. NomDeGuerre Reply

    Why does Microsoft make this so difficult? We all know there’s a Windows Installer (MSI) file in there somewhere. Yet they insist on trying to hide it. Your steps aren’t working for me. Instead of an InstallSource of C:ProgramDataPackage Cache{GUID}, InstallSource is something like C:RandomlyNamedTemporaryDirectory. After installation completes, the temporary directory is cleaned up (deleted), and I never actually see the directory after running vcredist_x64.exe. It must wait until I confirm the install to extract to the directory, and the install happens so fast by the time I check for the directory, it’s gone. On the details tab of the properties for my vcredist file: File version 11.0.60610.1.

  5. NomDeGuerre Reply

    I did eventually get it by trying on another system. The registry entry still pointed to some temporary directory on C:, but this time, there were folders in C:Program DataPackage Cache.

  6. Raja Reply

    WHile installing the vcredist_x86.exe file we are getting the ARP entry with some specific name.

    When installing the MSI’s we don’t get those entries.

    Is there any way to get the same ARP entry(the EXE installs) while installing the MSI??

    • nickekallen Post authorReply

      Hello,
      You can apply an MST to the MSI and ensure that it sets those entries

  7. Tiberivs Reply

    The additional parameter ADDEPLOY=1 does also work for the new 2013 redist (12.0.21005) MSI installer.

  8. Paul McGrath Reply

    Hi,
    I’ve been able to install silently with your help above but I am unable to uninstall silently. I get a warning box when uninstalling the x64 version:
    “If you continue with ths uninstall, 2 or more products may stop working properly. Do you want to continue with this uninstall anyway?”
    I usually use /QN but the uninstall didn’t happen, when I tested with a /QB I saw this message and I have to click yes or no. Any idea how I can default to yes?
    thanks
    Paul

    • nickekallen Post authorReply

      Hello,
      In which order are you uninstalling in? Does it work to uninstall in a different order?

      • Paul McGrath Reply

        Hi,
        I’ve tried to do the ‘minimum’ first and then the ‘additional’ and then the other way around and I was prompted again with the above message.
        Something is already installed which now relies on it but I only just installed it and everything was happy before this!
        I’ve been using these lines to uninstall:
        MsiExec.exe /X{37B8F9C7-03FB-3253-8781-2517C99D7C00} /qb

        MsiExec.exe /X{CF2BEA3C-26EA-32F8-AA9B-331F7E34BA97} /qb

        Obviously that must not be how you do it with 2012.
        thanks
        Paul

      • Paul McGrath Reply

        Found it 😉

        There was a third package folder with a 445kb file vcredist_x64.exe
        I run:
        vcredist_x64.exe /uninstall /quiet /norestart

        and this removes VC++ 2012
        thanks
        Paul

  9. Dxdesq Reply

    (Use logging on uninstall to discover which Action is provoking that message.)

    If you want to run the uninstall using msiexec you just need to drop (via MST) ALL the references to “WixDependency”. I was able to uninstall this way without using the exe.

  10. raj Reply

    where do you add the ADDeploy=1 in the MSI file, I would like to use a tool like “Orca” to edit the msi file and put the string there instead of using commandline.

  11. docolli Reply

    To get the ARP entry under “Programs and Functions” just remove the row ARPSYSTEMCOMPONENT=1 (in table PROPERTY) from every msi with ORCA, for example. Since you need to add ADDEPLOY anyhow on every msi that is no big deal.

    Makes checking, if runtime is installed on a client, much easier.

  12. Wes Reply

    C:\ProgramData\Package Cache\ means the visual c 2012 redistributable is using a “bundle”. See here http://wixtoolset.org/. Specifically here: http://wixtoolset.org/documentation/manual/v3/bundle/. A bundle is roughly like a bootstrapper. Rob, one of the developers, explains it here: http://robmensching.com/blog/posts/2009/7/14/lets-talk-about-burn/. So you may run into issues running MSIs alone.

    The visual studio team has switched to using the wix toolset; visual studio is installed using it. Burn uses the package cache to cache all the components (e.g. MSI, EXEs,…) so yoiu don’t need the software source to do a repair to change features for instance. See this: http://blogs.msdn.com/b/heaths/archive/2014/02/11/how-to-relocate-the-package-cache.aspx.

    I think there is a /layout command line option to extract all the components.

  13. Pawel Czopowik Reply

    I’m having a weird problem. I can install both MSI’s manually via command line by adding the ADDEPLOY=1 property. However, when i create a transform in ORCA I’m able to install the minimum but not the additional package – I get the message that tells me I need to run setup.exe. Is this case sensitive? I can’t seem to get this to work on the second package.

    • Pawel Czopowik Reply

      I figured out my own problem. As one would expect, I had a typo when testing the transform from command line. Instead of transforms= i had trasfoms=

  14. Pawel Czopowik Reply

    So this method does not work as the entries under the “Programs and Features” is different than if installing via the executable. Other software looks this up for prerequisites and fails to install because it does not find the prerequisite.

  15. kris r Reply

    Below is what just worked for me. This is probably not ideal for SCCM 2012 R2 deployments because it does not use the msiexec.exe…

    vcredist_x64.exe /install /quiet /restart
    vcredist_x86.exe /install /quiet /restart

  16. Andrew Reply

    Awesome. Worked for me to extract C++ 2015. Respect to the author.
    Don’t forget to create .mst file for GPO deployments, etc.

    Regards,

  17. Mauricio Reply

    Worked fine for 2015 x64 runtime

    That was a great walkthrough, thank you dude!!

  18. Smithd52 Reply

    Heya i am for the first time here. I found this board and I find It really useful &amp it helped me out much. I hope to give something back and aid others like you helped me. aadfkdeeedebedge

Leave a Reply

Your email address will not be published. Required fields are marked *