Welcome to MSDN Blogs Sign in | Join | Help

Update regarding silent install of the VC 8.0 runtime (vcredist) packages

A while back, I posted this item on my blog that describes options for silent installation of the Visual C++ 8.0 runtime redistributable setup packages.  When I investigated this issue and wrote that blog post, I based the command line parameters on the versions of vcredist_x86.exe, vcredist_x64.exe and vcredist_ia64.exe that are included in the directory %ProgramFiles%\Microsoft Visual Studio 8\SDK\v2.0\Bootstrapper\Packages when installing Visual Studio 2005.

However, a customer recently alerted me to an issue that I wasn't aware of previously.  The standalone versions of the VC runtime redistributable packages that are available for download via the web are packaged differently, and so the command lines that I previously documented for silent installation will not work with those versions of the packages.  Essentially, the standalone versions are wrapped in a second self-extracting EXE that displays a EULA before allowing extraction and execution of the main setup package, whereas the packages included as part of Visual Studio 2005 directly launch setup and are not doubly wrapped.

Therefore, here are some amended silent install instructions for the VC 8.0 runtime redistributable packages.  If you are using the packages included as a part of Visual Studio 2005, you can continue to use the silent install switches from my previous blog post.

However, if you have downloaded the standalone VC 8.0 redistributable packages, you will need to modify the command lines slightly.  The following command lines can be used to install the original release of the standalone VC 8.0 redistributable packages:

  • For x86: vcredist_x86.exe /q:a /c:"VCREDI~1.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "
  • For x64: vcredist_x64.exe /q:a /c:"VCREDI~2.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "
  • For ia64: vcredist_ia64.exe /q:a /c:"VCREDI~3.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "

The following command lines can be used to install the Visual Studio 2005 SP1 release of the standalone VC 8.0 redistributable packages:

  • For x86: vcredist_x86.exe /q:a /c:"VCREDI~3.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "
  • For x64: vcredist_x64.exe /q:a /c:"VCREDI~2.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "
  • For ia64: vcredist_ia64.exe /q:a /c:"VCREDI~1.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "

The following command lines can be used to install the Visual Studio 2005 SP1 ATL Security Update release of the standalone VC 8.0 redistributable packages:

  • For x86: vcredist_x86.exe /q:a /c:"VCREDI~3.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "
  • For x64: vcredist_x64.exe /q:a /c:"VCREDI~2.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "
  • For ia64: vcredist_ia64.exe /q:a /c:"VCREDI~1.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "

If you would like to install the VC runtime packages in unattended mode (which will show a small progress bar but not require any user interaction), you can change the /qn switch above to /qb.  If you would like the progress bar to not show a cancel button, then you can change the /qn switch above to /qb!

<update date="4/25/2007"> Added new command lines for the VS 2005 SP1 version of the VC 8.0 redistributable packages </update>

<update date="7/29/2007"> Updated command line switches to distinguish between unattended install mode and silent install mode </update>

<update date="10/16/2009"> Added information about the command lines for the VC++ 2005 SP1 ATL Security Update package. </update>

 

Published Wednesday, February 07, 2007 5:31 PM by astebner

Comments

Tuesday, February 13, 2007 7:44 PM by Nikola Dudar's WebLog

# Silent installs of VCRedist.EXE shipped with VS2005

Aaron has a post on his blog that describes way of silent install of VCRedist.EXE. I though I would cross-link

Tuesday, March 13, 2007 11:52 PM by Aaron Stebner's WebLog

# Links to more detailed information about using the VC runtime files in VS 2005 SP1

I have previously posted a few items about deploying the Visual C++ 8.0 runtime redistributable packages

Wednesday, April 25, 2007 1:28 AM by Aaron Stebner's WebLog

# Standalone VC 8.0 SP1 runtime redistributable packages are available for download

I previously wrote a blog post about updated versions of the Visual C++ 8.0 runtime files that shipped

Wednesday, April 25, 2007 11:36 AM by Anthony Wieser

# re: Update regarding silent install of the VC 8.0 runtime (vcredist) packages

It looks like in the SP1 version of the libraries, the internal files have different names:

For x86: vcredist_x86.exe /q:a /c:"VCREDI~3.EXE /q:a /c:""msiexec /i vcredist.msi /qb!"" "

appears to be the right way to go for x86.

For x64 it remains unchanged.

Anthony Wieser

Wieser Software Ltd

Wednesday, April 25, 2007 11:44 AM by astebner

# re: Update regarding silent install of the VC 8.0 runtime (vcredist) packages

Hi Anthony - Good catch!  I'll update this post with the new command line needed for the SP1 versions of these packages.

Thursday, June 14, 2007 6:04 AM by AlGrissom

# re: Update regarding silent install of the VC 8.0 runtime (vcredist) packages

Thank you. Very useful info.

Monday, July 30, 2007 5:10 PM by Scott Lawrence

# re: Update regarding silent install of the VC 8.0 runtime (vcredist) packages

I am still having problems getting the vcredist_x86 to install silently.

I am using Microsoft Visual Studio 2005 and the downloaded version of the VC++ redist. I am modifing the bootstraper Product.XML.

When I look inside the self-extracting file vcredist_x86.exe I can see that it contains the VCREDI~3.EXE file.

So in my C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86\product.xml

I am using:

vcredist_x86.exe /q:a /c:"VCREDI~3.EXE /q:a /c:""msiexec /i vcredist.msi /qb!"" ".  

This does not seem to work silently!

++++++++++++++++++++++++++++++++++++++++

<?xml version="1.0" encoding="utf-8" ?>

<Product

 xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"

 ProductCode="Microsoft.Visual.C++.8.0.x86"

>

 <!-- Defines list of files to be copied on build -->

 <PackageFiles>

   <PackageFile Name="vcredist_x86.exe"/>

 </PackageFiles>

 <InstallChecks>

   <MsiProductCheck Property="VCRedistInstalled" Product="{A49F249F-0C91-497F-86DF-B2585E8E76B7}"/>

 </InstallChecks>

 <!-- Defines how to invoke the setup for the Visual C++ 8.0 redist -->

 <!-- TODO: Needs EstrimatedTempSpace, LogFile, and an update of EstimatedDiskSpace -->

 <Commands Reboot="Defer">

   <Command PackageFile="vcredist_x86.exe"

    Arguments=' /q:a /c:"VCREDI~3.EXE /q:a /c:""msiexec /i vcredist.msi /qb!"" "'>

     <!-- These checks determine whether the package is to be installed -->

     <InstallConditions>

       <BypassIf Property="VCRedistInstalled" Compare="ValueGreaterThanOrEqualTo" Value="3"/>

       <!-- Block install if user does not have admin privileges -->

       <FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired"/>

       <!-- Block install on Win95 -->

       <FailIf Property="Version9X" Compare="VersionLessThan" Value="4.10" String="InvalidPlatformWin9x"/>

       <!-- Block install on NT 4 or less -->

       <FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.00" String="InvalidPlatformWinNT"/>

     </InstallConditions>

     <ExitCodes>

       <ExitCode Value="0" Result="Success"/>

       <ExitCode Value="3010" Result="SuccessReboot"/>

       <DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />

     </ExitCodes>

   </Command>

 </Commands>

</Product>

Any help in getting this to perform a silent-no-UI install is greatly appreciated.

Monday, July 30, 2007 5:20 PM by astebner

# re: Update regarding silent install of the VC 8.0 runtime (vcredist) packages

Hi Scott - I'm sorry for the confusion here.  The command lines I originally listed in this blog post are for an unattended install (one that shows a small progress dialog but does not require any user interaction).  You can achieve a fully silent install by changing the /qb! command line switch to /qn.  I've updated the wording of this blog post to reflect this to try to avoid confusion in the future.

Hopefully this helps!

Tuesday, July 31, 2007 10:43 AM by Scott Lawrence

# re: Update regarding silent install of the VC 8.0 runtime (vcredist) packages

Thank you for your response.

When i run the setup.exe that is created by the deployment project i am receiving a dialoge box that contains:

The following components will be installed on your machine:

Visual C++ Runtime Libraries (x86)

Do you wish to install these components?

If you choose Cancel, setup will exit.

Install Cancel

This pops up on install no matter what i have done to try to silence it.  

I hoped using the command switches you identified would do it but the dialogue message still appears.

Any hlep you can provide on this appreciated.

Tuesday, July 31, 2007 1:00 PM by astebner

# re: Update regarding silent install of the VC 8.0 runtime (vcredist) packages

Hi Scott - Unfortunately, the bootstrapper setup.exe that is created by the Visual Studio setup/deployment projects does not support fully silent installs of packages that it chains.  The command lines I listed in this blog post are not helpful in that scenario, but they will work if you are running the VC redist package directly (and not via the VS setup/deployment bootstrapper).  I'm sorry for the hassles.

Wednesday, April 02, 2008 8:22 AM by HolgerG

# re: Update regarding silent install of the VC 8.0 runtime (vcredist) packages

Very useful information, thanks.

Does anyone have a list of possible return codes? I would like to install it as a prerequisite and I could need a return code if a reboot is required.

Wednesday, April 02, 2008 12:44 PM by astebner

# re: Update regarding silent install of the VC 8.0 runtime (vcredist) packages

Hi HolgerG - The return codes for the VC redist packages follow a traditional setup return code pattern, as follows:

0 = success, no reboot required

3010 = success, reboot required

any other value = failure

Friday, April 25, 2008 11:47 AM by raboyd

# re: Update regarding silent install of the VC 8.0 runtime (vcredist) packages

Thank-you! Newbie, perhaps silly question:

What is the command to uninstall the package? I tried /x, that seemed to make it attempt to extract all files.

How do most people handle the dilemma of deciding whether to uninstall VC redist or not? Prompting may confuse the user but silently removing it may break other programs.

Friday, April 25, 2008 7:29 PM by astebner

# re: Update regarding silent install of the VC 8.0 runtime (vcredist) packages

Hi Raboyd - The silent uninstall would need to look something like this (as an example, I'm using the x86 package listed above in this blog post):

vcredist_x86.exe /q:a /c:"VCREDI~1.EXE /q:a /c:""msiexec /x vcredist.msi /qn"" "

In general, your application should not attempt to uninstall the VC redistributable package as a part of your uninstall because it could be needed by other applications on the system.  This recommendation holds for other redistributable programs that you might install as a part of your setup as well (such as the .NET Framework).

Also, as you say, prompting the user will likely be confusing to them, and there will be at least some of them that choose to uninstall the redistributable package and inadvertantly remove it out from under other applications on the system that need it.

Monday, April 28, 2008 11:05 AM by raboyd

# re: Update regarding silent install of the VC 8.0 runtime (vcredist) packages

Thanks for the prompt response!

In playing around with my install, it seems that re-installing if the package is already installed does not cause a problem.

Is the preferred behavior to first check to see if it is already installed? If so, how do I determine if the package is already installed? I assume it's in the registry somewhere?

Also it seems at least on my computer that having two versions installed simultaneously does not cause a problem. For example I currently have the 2005 and 2008 redistribs installed. Is this OK?

Thanks for your help. Sorry if I'm getting a little off topic here...

Mona

Monday, April 28, 2008 11:59 AM by astebner

# re: Update regarding silent install of the VC 8.0 runtime (vcredist) packages

Hi Raboyd - Ideally, an application would first check to see if the VC redist package is already installed.  However, these packages were not designed to include an easy registry-based detection mechanism.  I outlined a way to check for the presence of them in these blog posts:

http://blogs.msdn.com/astebner/archive/2007/01/16/mailbag-how-to-detect-the-presence-of-the-vc-8-0-runtime-redistributable-package.aspx

http://blogs.msdn.com/astebner/archive/2007/01/24/updated-vc-8-0-runtime-redistributable-packages-are-included-in-visual-studio-2005-sp1.aspx

It won't hurt anything though if you make your installer always run the VC redist installer package, even if it is already installed.  It will be smart enough to do a repair/re-install if it is already installed.

Also, the VS 2005 and VS 2008 versions of the VC runtime files are designed to install and run side-by-side, so there should not be any problems installing both on the same system.

Hopefully this helps!

Wednesday, March 25, 2009 7:52 AM by Sangeeta

# re: Update regarding silent install of the VC 8.0 runtime (vcredist) packages

Do you have any idea about silent installation of VC++ 2008 SP1.I want to silently install VC++ 2008 SP1 along with my application.Any idea about command line used for installing VC++ 2008 SP1?

Wednesday, March 25, 2009 2:29 PM by astebner

# re: Update regarding silent install of the VC 8.0 runtime (vcredist) packages

Hi Sangeeta - I thought I had already posted something like this, but I can't find it so I think I may have forgotten.  I'll work on a post about this topic in the next couple of days.

Friday, March 27, 2009 2:56 AM by Aaron Stebner's WebLog

# Mailbag: How to perform a silent install of the Visual C++ 2008 redistributable packages

Question: You previously posted a list of command line switches to perform silent and unattended installations

Friday, April 17, 2009 12:43 PM by astebner

# re: Update regarding silent install of the VC 8.0 runtime (vcredist) packages

Hi Sangeeta - I've written an updated blog post that describes how to perform a silent install of the VC++ 2008 and VC++ 2008 SP1 redistributable.  You can find that at http://blogs.msdn.com/astebner/archive/2009/03/26/9513328.aspx.

Anonymous comments are disabled
 
Page view tracker