[英]Visual C++ 2012 Runtime Library prerequisite for Visual Studio 2010
我當前使用的是Visual Studio 2010 Professional,我想知道是否可以將Visual C ++ 2012 Runtime Library添加到安裝項目的先決條件中?
目前,我只能選擇Visual C ++ 2010運行時庫
我已經嘗試過標題為“ 檢查Microsoft更新 ”的鏈接(在先決條件配置屏幕上),以查看更多可重新分發的組件,但是我被重定向到http://msdn.microsoft.com/zh-cn/vstudio/aa496123.aspx,並且找不到任何添加該功能的功能都可以通過Visual Studio 2010完成。
使用以下結構在C:\\ Program Files(x86)\\ Microsoft SDKs \\ Windows \\ v7.0A \\ Bootstrapper \\ Packages中創建了vcredist_x86(2012)文件夾:
+ vcredist_x86 (2012)
| + en
| |_ package.xml
|_ product.xml
|_ vcredist_x86.exe
package.xml
<?xml version="1.0" encoding="utf-8" ?>
<Package
xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
Name="DisplayName"
Culture="Culture"
>
<Strings>
<String Name="DisplayName">Visual C++ 2012 Runtime Libraries (x86)</String>
<String Name="Culture">en</String>
<String Name="AdminRequired">You do not have the permissions required to install Visual C++ 2012 Runtime Libraries (x86). Please contact your administrator.</String>
<String Name="InvalidPlatformWin9x">Installation of Visual C++ 2012 Runtime Libraries (x86) is not supported on Windows 95. Contact your application vendor.</String>
<String Name="InvalidPlatformWinNT">Installation of Visual C++ 2012 Runtime Libraries (x86) is not supported on Windows NT 4.0. Contact your application vendor.</String>
<String Name="GeneralFailure">A failure occurred attempting to install Visual C++ 2012 Runtime Libraries (x86).</String>
</Strings>
</Package>
product.xml
<?xml version="1.0" encoding="utf-8" ?>
<Product
xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
ProductCode="Microsoft.Visual.C++.12.0.x86"
>
<PackageFiles>
<PackageFile Name="vcredist_x86.exe" HomeSite="VCRedistExe"/>
</PackageFiles>
<InstallChecks>
<MsiProductCheck Property="VCRedistInstalled" Product="{DA5E371C-6333-3D8A-93A4-6FD5B20BCC6E}"/>
</InstallChecks>
<Commands Reboot="Defer">
<Command PackageFile="vcredist_x86.exe"
Arguments=' /q:a '
>
<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"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success"/>
<ExitCode Value="3010" Result="SuccessReboot"/>
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
</Commands>
</Product>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.