Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio
All postings are provided AS IS
with no warranties, and confer no rights. Additionally, views expressed
herein are my own and not those of my employer, Microsoft.
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:
The following command lines can be used to install the Visual Studio 2005 SP1 release of the standalone VC 8.0 redistributable packages:
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:
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>
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!
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?
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.
Question: You previously posted a list of command line switches to perform silent and unattended installations
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.
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)
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):
Silent install for VC++ 2008 Redistributable (x64):
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,
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.
Here is a full example of detecting Visual C++ 2008 SP1 run-time files (Visual C++ 9.0 run-time redistributable package)
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.
Are the command line options the same for vcredist_x86 for the KB2467175 update?
Hi Adrian Sheard - If you are referring to the download at 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"
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.
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?