• I include and run vcredist_x86.exe in an installer based on Inno Setup. vcredist_x86.exe works fine, but it takes a rather long time to run (several minutes), even when it is already installed.


    I would really like to have a utility from Microsoft, that will quickly detect if the vc redistributables are installed, and if not, download (from Microsoft) and install them.


    Are there any plans for such a utility?


    Can I make the current vcredist_x86.exe quickly exit if the vc redistributables are already installed?






    Wednesday, April 04, 2007 3:29 PM

All replies

  • Microsoft's license for the vc8 redistributable allows you to include the dlls directly into your installation program. There are some restrictions, check redist.txt in you Microsoft Visual Studio 8 directory.

    If you're worried about installation times, then this is probably a good option.
    Wednesday, April 04, 2007 5:29 PM
  • Have you tried the Setup and Deployment Project in Visual C++ 2005?


    If not, give this a try in your solution or in some test solution you have:

    1. File -> Add New Project

    2. Project Type: Other Project Types -> Setup and Deployment, select the Setup Wizard template.


    When the Setup Wizard starts, select:

     - Create a setup for a Windows application, Next

     - Primary Output from <project name>, and any other files you want to deploy, Next

     - Add any additional files if you want to deploy, if any (like config files or data files), Next

     - Finish


    3. Go to Build -> Configuration Manager, check the box to build the Setup project.


    4. You should see any detected dependencies appear int the Solution Explorer underneath the Setup Project.  These are the things the installer will look for.


    5. Go through Windows Explorer and find the output from the Setup Project, there should be a setup.exe file and a .msi file.  That is the installer program.


    6. To make sure all the the redistributables go along with your setup project, RIGHT click on the Setup Project in the Solution Explorer, click on Properties.  When the Setup Property Pages dialog appears, click Prerequisites.

     - At a minimum, check the boxes for .NET Framework 2.0 and Windows Installer 3.1.

     - If you want to grab all the redistributables, check Visual C++ Runtime Libraries.  Otherwise, the installer will automatically install just the dlls you need instead of the entire package.

     - Select the radio button for Download prerequisites from the same location as my application -- this will put the necessary files alongside setup.exe.


    7. Rebuild Solution and go back to Windows Explorer.  Next to setup.exe and your msi file, you will see a folder dotnetfx that contains the .NET installer, the Windows Installer 3.1 installer and whatever else you checked in the box.


    Finally, if you want to have the installer do things like add an icon to the desktop and/or add items to the user's Programs menu, double click on the Setup Project in the solution explorer and experiment with the File System on Target Machine.


    I was going to go the approach of a third-party installer, but after finding this feature in VC++ 2005, I decided to just go with this solution.  It does everything I need it to do, but that's just me -- you might need to do more with your installer.  Unfortunately, this feature is not well documented in MSDN for VC++ 2005... grr.  I ended up using partial instructions through MSDN and just struggling through this for a while with some developers who had used the Setup and Deployment feature in C#.

    Wednesday, April 04, 2007 10:15 PM
  • I am currently not able to use a "setup and deployment" project for the installer.


    Here is a quote from a user:


    "Why is the C++ redistributable step so slow on the install?  It looks like the install is hung?"


    Does anyone have an answer?






    Thursday, April 05, 2007 9:06 PM
  • Here is some timing information.


    On my development PC, which has a 2.4 GHz Pentium 4 and 1 GB memory, I ran vcredist_x86 twice. Both times, the redistributables were already installed.


    Test 1: elapsed time - over 5 minutes

    Test 2: elapsed time - 4 minutes and 50 seconds


    During the install, there were 3 copies of msiexec.exe running.  I believe these are started by vcredist_x86.exe.





    Thursday, April 05, 2007 9:44 PM