I'm currently using Visual Studio 2010 Professional, and I was wondering if there's any way to add the Visual C++ 2012 Runtime Library , to the Prerequisites of a Setup Project?
At the moment I only have the option to choose the Visual C++ 2010 Runtime Library
I already tried the link (present on the prerequisites configuration screen) entitled Check Microsoft Update for more redistributable components but I get redirected to http://msdn.microsoft.com/en-us/vstudio/aa496123.aspx and can't find anything to add that functionality do Visual Studio 2010.
Created a vcredist_x86 (2012) folder in C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Bootstrapper\\Packages with following structure:
+ 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>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.