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>


Comments (46)

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

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

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

  4. Anthony Wieser says:

    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

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

  6. Thank you. Very useful info.

  7. Scott Lawrence says:

    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 FilesMicrosoft Visual Studio 8SDKv2.0BootStrapperPackagesvcredist_x86product.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" ?>





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


       <PackageFile Name="vcredist_x86.exe"/>



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


     <!– 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 –>


           <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"/>



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

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

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





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

  8. 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!

  9. Scott Lawrence says:

    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.

  10. 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.

  11. HolgerG says:

    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.

  12. 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

  13. raboyd says:

    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.

  14. 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.

  15. raboyd says:

    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…


  16. 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:



    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!

  17. Sangeeta says:

    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?

  18. 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.

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

  20. 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.

  21. thanatos83 says:

    Hi Aaron!

    This method works in Visual C++ 2008 (x64)???, because full extraction and install then not working, so i see the first page of wizard of installation.

    Inside there are two MSI files like (install.msi and vc_red.msi)


  22. Hi Thanatos83 – The command lines for the VC++ 2008 Redistributable packages are listed in the blog post at http://blogs.msdn.com/astebner/archive/2009/03/26/9513328.aspx.  Can you please give those command lines a try and see if they work for you in this scenario?  To summarize that other post:

    Unattended install for VC++ 2008 Redistributable (x64):

    vcredist_x64.exe /qb

    Silent install for VC++ 2008 Redistributable (x64):

    vcredist_x64.exe /qn

  23. G says:

    Hi, Astebner, this is pretty useful information. But there is a small problem – this leaves "ugly" temporary files lying around on C:. Would you break down and explain the command line arguments so that we can  perhaps uninstall in a temp directory?

    thanks and regards,


  24. Hi G – There is a known bug in the installer for the Visual C++ 2008 redistributable files that causes it to install some files at the root of the C drive.  This is described in more detail in the knowledge base article at support.microsoft.com/…/950683, and this issue is fixed in the Visual C++ 2008 SP1 redistributable installer.

  25. mdb-blog says:

    Here is a full example of detecting Visual C++ 2008 SP1 run-time files  (Visual C++ 9.0 run-time redistributable package)


  26. NotStuckAnymore says:

    To Scott Lawrence:

    I had your issue as well, but found a way around it:

    You could extract the contents of vcredist_x86.exe, giving you VCREDI~3.EXE.

    Then run VCREDI~3.EXE /q:a /c:"msiexec /i vcredist.msi /qn"

    The result is a nice and silent install of the the redistributable.

  27. Adrian Sheard says:

    Are the command line options the same for vcredist_x86 for the KB2467175 update?

  28. Hi Adrian Sheard – If you are referring to the download at http://www.microsoft.com/…/details.aspx, then the command line for a silent install will look like this:

    vcredist_x86.exe /q:a /c:"msiexec /i vcredist.msi /qn"

  29. Adrian Sheard says:

    Hi Aaron, thanks, that works well. However, if I install a package build with KB2467175's vcredist it works fine; if I then install an older package (built with the previous redist – the one that most of this thread refers to) then the newer (KB2467175) redist is uninstalled automatically (I think the version numbers in the redists are wrong i.e. older redist is 8.0.59193, newer redist (KB2467175) is 8.0.51011 and the new package's programs fail with a side by side configuration error.

    Any ideas?

  30. Hi Adrian Sheard – I haven't heard of this behavior before.  Can you post a link to where you downloaded the version that you installed that caused KB2467175 to be uninstalled so I can take a quick look?

  31. Adrian Sheard says:

    Aaron, sorry for delay …

    This is link for KB2467175: download.microsoft.com/…/vcredist_x86.exe

    This is link for 'older'  : download.microsoft.com/…/vcredist_x86.exe


  32. Hi Adrian Sheard – You're right – the "older" redistributable package has a higher version number than the "newer" one, and it is configured to automatically uninstall previous version numbers.  You'll need to install the "older" one before the "newer" one to avoid this behavior.  If you get a chance, can you please also report this issue on the Connect site as well – connect.microsoft.com/visualstudio

  33. MinorFlaw says:

    Hi, What are the silent install command line options for the KB2538242 update , @


    None of the above seem to help..

  34. StuckAgain says:


    what are the command line options for the KB2538242 update available at


  35. Joost van Zoest says:

    For the Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update (x86) the command line arguments should be:

    /q:a /c:"VCREDI~1.EXE /q:a /c:""msiexec /i vcredist.msi /qn

    Why is Microsoft changing the number in the VCREDI~.EXE all the time?

  36. Hi StuckAgain and Joost van Zoest – It doesn't look like the VC++ 2005 SP1 Redistributable MFC Security Update has an EXE inside the main vcredist_x86.exe.  As a result, the command line would look something like this:

    vcredist_x86.exe /q:a /c:"msiexec /i vcredist.msi /qn /l*v %temp%vcredist_log.txt"

    Unfortunately, the names appear to change from release to release, so you'll have to extract the vcredist_x86.exe and check the exact contents to figure out the command line each time.  I'm sorry for the hassles with that naming.  🙁

  37. Michel says:

    Hi Aaron,

    Thanks for informative post. Couple of questions:

    1.) Does installing this VC redist actually return valid exit code? It seems to me that it is always returning exist code 0. How can we print reurn code of running this exe in silent mode on command prompt?

    2.) Is there any separate switch option of running this vcredist exe in 'repair' mode in case it is already installed on system? or using same options always and it would automatically run in 'repair' mode upon detecting it already installed on system?

  38. Hi Michel – Yes, the VC++ redistributable should return valid return codes.  You can use the %ERRORLEVEL% variable in a cmd prompt to check the return code.  If you do a search for that variable, you can find several different examples of how to do that.

    You can run the install command line and it should do a new install if the VC++ redistributable is not yet installed or a repair if it is already installed.

  39. Michel says:

    I checked the %ERRORLEVEL% variable but it is always '0' even if the installtion failed. I have a system where vcredist 2008 x86 install is failing always due to some registry issues (error 1603). The MSI log also says failure, but running this vcredist_x86.exe in silent mode always return '0'. Any pointers?

  40. Hi Michel – I've seen setup programs that chain in the VC++ Redistributable and they are able to correctly detect whether or not the install succeeds by examining the exit code.  I think this might just be something in how the ERRORLEVEL value is being assigned or something like that.  I'm not an expert in batch scripting, so I'm not sure what to suggest to solve this though.  Is it an option for you to install the VC++ Redistributable via a setup chainer as opposed to a batch script?

  41. zzz says:

    theres a new version.


    it doesn't appear to have the double wrapper so i think the comman lines from the first post should work with these:


  42. Nitin says:

    Yes, the new installer does not has a double wrapper. So the command used for double wrapper installation does not work on some systems. The command for this should be the one used for single wrapper Exe i.e.

    /q:a /c:"msiexec /i vcredist.msi /qn /norestart"

    It's quite surprising to see that Microsoft keeps changing the format of VC 2005 redist EXE's – sometimes they are posted with double wrapper; while sometimes without the double wrapper. They shoould stick to one format!

  43. Martin says:

    Why not just unpack it with 7zip, and do a single "msiexec /i vcredist.msi" ?

  44. Hi Martin – That is a valid way of installing the VC++ redistributable too.  The command lines in this blog post are intended for scenarios where a developer wants to automate the installation in a single step instead of unpacking in a separate step.

  45. Packager says:

    vcRedist_2005_sp1_x86.exe /q:a /c:"msiexec /i vcredist.msi /qb!"

    Works for me, shows small install status but user cannot click cancel.

  46. James says:

    I made a MST to solve the issue in KB927665 by adding correct path into it.



    start "" /wait vcredist_x64_2005_RTM.exe /q:a /c:"VCREDI~2.EXE /q:a /c:""msiexec /i vcredist.msi /qb! TRANSFORMS=""""%CD%vcredist_x64_2005_RTM_KB927665_Fix.mst"""" "" "

    timeout 1

    start "" /wait vcredist_x64_2005_SP1.exe /q:a /c:"VCREDI~2.EXE /q:a /c:""msiexec /i vcredist.msi /qb! TRANSFORMS=""""%CD%vcredist_x64_2005_SP1_KB927665_Fix.mst"""" "" "

    timeout 1

    start "" /wait vcredist_x64_2005_SP1_ATL.exe /q:a /c:"msiexec /i vcredist.msi /qb!"

    timeout 1

    start "" /wait vcredist_x64_2005_SP1_MFC.exe /q:a /c:"msiexec /i vcredist.msi /qb!"

    timeout 1