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.
Question:
Visual Studio 2005 includes redistributable setup packages to install the Visual C++ 8.0 runtime files such as msvcr80.dll, atl80.dll, etc. I would like to run this setup in fully silent mode, but when I run it normally, it displays a progress page. How can I run this setup package in fully silent mode?
Answer:
The Visual C++ 8.0 redist packages (vcredist_x86.exe, vcredist_x64.exe and vcredist_ia64.exe) support the following command line installation options. The examples below use the file named vcredist_x86.exe, but you can substitute the 64-bit versions of the EXEs with equivalent command lines to achieve the same behavior for them as well.
Unattended install
This option will run setup and display a progress dialog but requires no user interaction.
vcredist_x86.exe /q:a
Unattended install with no cancel button
This option is the same as the previous option, except that the user will not have the option to press cancel during installation.
vcredist_x86.exe /q:a /c:"msiexec /i vcredist.msi /qb! /l*v %temp%\vcredist_x86.log"
Silent install
This option will suppress all UI during installation.
Vcredist_x86.exe /q:a /c:"msiexec /i vcredist.msi /qn /l*v %temp%\vcredist_x86.log"
Note about standalone VC++ redistributable packages
The instructions above apply to the copies of the VC++ redistributable packages that ship with Visual Studio 2005. If you are downloading and trying to install the standalone versions of the VC++ redistributable packages instead of using the copies included with Visual Studio 2005, you will need to use slightly different command line parameters. Please refer to this blog post for information about the command line parameters you will need to use in that case.
<update date="10/16/2009"> Added a link to a separate blog post with command line syntax for the standalone versions of the VC++ 2005 redistributable packages. </update>
Hi Didier - You should not try to install this vcredist package using a nested install. Performing nested installs causes problems with installing hotfixes for the child packages. You will need to use some kind of chainer to launch the vcredist setup package in silent mode, and then launch your main MSI setup afterwards.
A while back, I posted this item on my blog that describes options for silent installation of the Visual
Aaron has a post on his blog that describes way of silent install of VCRedist.EXE. I though I would cross-link
I have previously posted a few items about deploying the Visual C++ 8.0 runtime redistributable packages
I previously wrote a blog post about updated versions of the Visual C++ 8.0 runtime files that shipped
This guide is intended to serve as a collection of links to articles, tools, tips and tricks that explain
Hi Aron;
I am having trouble getting this redistributable to work(the way I want). I was able to issue your command:
Vcredist_x86.exe /q:a /c:"msiexec /i vcredist.msi /qn /l*v %temp%\vcredist_x86.log" and it succeeds some on some machines but fails on others. I tried to redirect the log so I can take a peek but I could not understand anything from it. It is like this:
=== Verbose logging started: 9/11/2001 9:28:31 Build type: SHIP UNICODE 3.01.4001.5512 Calling process: C:\WINDOWS\system32\msiexec.exe ===
MSI (c) (24:78) [09:28:31:796]: Resetting cached policy values
MSI (c) (24:78) [09:28:31:796]: Machine policy value 'Debug' is 0
MSI (c) (24:78) [09:28:31:796]: ******* RunEngine:
******* Product: vcredist.msi
******* Action:
******* CommandLine: **********
MSI (c) (24:78) [09:28:31:796]: Client-side and UI is none or basic: Running entire install on the server.
MSI (c) (24:78) [09:28:31:796]: Grabbed execution mutex.
MSI (c) (24:78) [09:28:31:921]: Cloaking enabled.
MSI (c) (24:78) [09:28:31:921]: Attempting to enable all disabled priveleges before calling Install on Server
MSI (c) (24:78) [09:28:31:937]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (BC:00) [09:28:31:968]: Grabbed execution mutex.
MSI (s) (BC:34) [09:28:31:968]: Resetting cached policy values
MSI (s) (BC:34) [09:28:31:968]: Machine policy value 'Debug' is 0
MSI (s) (BC:34) [09:28:31:968]: ******* RunEngine:
******* Product: C:\DOCUME~1\Tom\LOCALS~1\Temp\IXP000.TMP\vcredist.msi
MSI (s) (BC:34) [09:28:32:015]: Note: 1: 2203 2: C:\DOCUME~1\Tom\LOCALS~1\Temp\IXP000.TMP\vcredist.msi 3: -2147287038
MSI (s) (BC:34) [09:28:32:031]: MainEngineThread is returning 2
MSI (c) (24:78) [09:28:32:031]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (24:78) [09:28:32:031]: MainEngineThread is returning 2
=== Verbose logging stopped: 9/11/2001 9:28:32 ===
My goal is to be able to silently issue the command from a Java application prior to calling another command that uses a DLL which depends on this redistributable package.
Your help is greatly appreciated.
Kamal
Hi Kamalsofteng - From what I can tell, the HRESULT in that error log you attached is indicating that Windows Installer ran into a problem finding the MSI at the path in your %temp% directory. I'm not sure what would cause that to happen though - does the same thing happen if you run VC redist installation manually, or is it only when you launch it programatically via your application? Also, is there anything special about the %temp% directory on the system where this is failing (is it encrypted, compressed, read-only or anything like that)?
Do you have any idea about VC++ 2008 SP1 silent install command line.
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.
The command line will be simpler in the 2008 version. All you should need is something like the following for a silent install:
vcredist_x86.exe /q
Or the following for an unattended install:
vcredist_x86.exe /qb
I am trying to run vcredist_x86.exe as Silent install but I cannot find vcredist.msi anywhere. Can you please tell me where to get it. Thanks alot!
**********************************
*****************************************
Hi DDuong - The file vcredist_x86.exe is a self-extracting EXE, and the MSI is contained inside that EXE. The command lines I listed in this blog post will extract the MSI to a temporary location and install it from there.
If you need to just extract the MSI, you can run vcredist_x86.exe /c and choose a path to extract the files to.
how can i do silent install without admin Privilege user? Is it possible?
Thanks
Ams