Mailbag: How to perform a silent install of the Visual C++ 2010 redistributable packages
2014-04-03 16:45
756 查看
转自英文网站:http://blogs.msdn.com/b/astebner/archive/2010/10/20/10078468.aspx
Question:
You previously posted lists of command line switches to perform silent and unattended installations of the
Visual C++ 2005 redistributable and the
Visual C++ 2008 redistributable. How can I perform silent and unattended installations of the Visual C++ 2010 redistributable?
Answer:
The Visual C++ 2010 redistributable 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 x64 or ia64 versions of the EXEs with equivalent command lines to achieve the same behavior for them as well.
Silent install
This option will suppress all UI and perform an install.
<full path>\vcredist_x86.exe /q /norestart
For example, if you download vcredist_x86.exe to a folder named c:\vc2010redist, then the command line would look like this:
c:\vc2010redist\vcredist_x86.exe /q /norestart
Unattended install
This option will display a progress dialog (but requires no user interaction) and perform an install.
<full path>\vcredist_x86.exe /passive /norestart
For example, if you download vcredist_x86.exe to a folder named c:\vc2010redist, then the command line would look like this:
c:\vc2010redist\vcredist_x86.exe /passive /norestart
Silent repair
This option will suppress all UI and perform a repair.
<full path>\vcredist_x86.exe /q /repair /norestart
For example, if you download vcredist_x86.exe to a folder named c:\vc2010redist, then the command line would look like this:
c:\vc2010redist\vcredist_x86.exe /q /repair /norestart
Silent uninstall
This option will suppress all UI and perform an uninstall.
<full path>\vcredist_x86.exe /q /uninstall /norestart
For example, if you download vcredist_x86.exe to a folder named c:\vc2010redist, then the command line would look like this:
c:\vc2010redist\vcredist_x86.exe /q /uninstall /norestart
A note about reboots
All of the examples above use the /norestart switch to suppress reboots after the setup process completes. The /norestart switch does not eliminate the need to reboot entirely – it just gives the calling process control over when to schedule the reboot
if one is needed due to files being in use during setup. If you run the Visual C++ 2010 redistributable setup and use the /norestart switch, you must check the exit code returned by the setup process and handle it accordingly in the calling process. Here
are the possible exit codes:
Exit code 0 means that setup succeeded and no reboot is needed.
Exit code 3010 means that setup succeeded and a reboot is needed to complete installation.
Any other exit code means that setup failed.
Related link
How to detect the install state for the Visual C++ 2010 redistributable packages
Question:
You previously posted lists of command line switches to perform silent and unattended installations of the
Visual C++ 2005 redistributable and the
Visual C++ 2008 redistributable. How can I perform silent and unattended installations of the Visual C++ 2010 redistributable?
Answer:
The Visual C++ 2010 redistributable 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 x64 or ia64 versions of the EXEs with equivalent command lines to achieve the same behavior for them as well.
Silent install
This option will suppress all UI and perform an install.
<full path>\vcredist_x86.exe /q /norestart
For example, if you download vcredist_x86.exe to a folder named c:\vc2010redist, then the command line would look like this:
c:\vc2010redist\vcredist_x86.exe /q /norestart
Unattended install
This option will display a progress dialog (but requires no user interaction) and perform an install.
<full path>\vcredist_x86.exe /passive /norestart
For example, if you download vcredist_x86.exe to a folder named c:\vc2010redist, then the command line would look like this:
c:\vc2010redist\vcredist_x86.exe /passive /norestart
Silent repair
This option will suppress all UI and perform a repair.
<full path>\vcredist_x86.exe /q /repair /norestart
For example, if you download vcredist_x86.exe to a folder named c:\vc2010redist, then the command line would look like this:
c:\vc2010redist\vcredist_x86.exe /q /repair /norestart
Silent uninstall
This option will suppress all UI and perform an uninstall.
<full path>\vcredist_x86.exe /q /uninstall /norestart
For example, if you download vcredist_x86.exe to a folder named c:\vc2010redist, then the command line would look like this:
c:\vc2010redist\vcredist_x86.exe /q /uninstall /norestart
A note about reboots
All of the examples above use the /norestart switch to suppress reboots after the setup process completes. The /norestart switch does not eliminate the need to reboot entirely – it just gives the calling process control over when to schedule the reboot
if one is needed due to files being in use during setup. If you run the Visual C++ 2010 redistributable setup and use the /norestart switch, you must check the exit code returned by the setup process and handle it accordingly in the calling process. Here
are the possible exit codes:
Exit code 0 means that setup succeeded and no reboot is needed.
Exit code 3010 means that setup succeeded and a reboot is needed to complete installation.
Any other exit code means that setup failed.
Related link
How to detect the install state for the Visual C++ 2010 redistributable packages
相关文章推荐
- Mailbag: How to detect the presence of the Visual C++ 9.0 runtime redistributable package
- How to detect the presence of the Visual C++ 2010 redistributable package
- How to change the text color of the selected property sheet tab in Visual C++
- How To Install Help Files Locally Of Visual Studio 2010
- How to add icon for the item of ListCtrl using C++ (Mail Attachment ListCtrl) - 如何用C++为ListCtrl的Item添加图标(邮件附件ListCtrl)
- How to hide my site and my document link in the right-top corner of sharepoint 2010
- The ABCs of LDAP: How to Install, Run, and Administer LDAP Services
- How to Use the Visual C++ DEBUGGER
- [未完待续]对安装CCMake的一点理解(how to install the latest version of ccmake)
- How to use the System Restore API to save and to restore system data in Visual C++
- How can I use Microsoft Visual C++ 2010 to create MEX files with MATLAB 7.10 (R2010a)?
- How to determine the size of a class/struct in the C++?
- 【转】How to install and configure SharePoint Server 2010 SP1 on the existing SP 2010 Farm
- How to pass the paramater of Node.js or io.js into native C/C++ function.
- How to automate PowerPoint by using Visual C++ 5.0 or Visual C++ 6.0 with The Microsoft Foundation Classes
- How to change the background color of form using C++ - 如何用C++改变窗体的颜色
- How to pass the paramater of Node.js or io.js into native C/C++ function.
- How do you copy the contents of an array to a std::vector in C++ without looping? (From stack over flow)
- How to install the C++ Boost Libraries on Windows
- How To Set Dark Theme in Visual Studio 2010