Microsoft visual studio "setup blocked" - installation

When I try to install Microsoft visual studio 2015 it gives the error "Setup Blocked". telling me:"The computer needs to be restarted before setup can continue. Please restart the computer and run setup again."
after doing so it still doesn't work...
I'm on Windows 10 Build 10130
this is the last bit of the log file:
[0A60:1530][2015-07-10T18:48:06]i101: Detected package: VSSetupUtility_Complete_vs_community, state: Absent, cached: None
[0A60:1530][2015-07-10T18:48:06]i000: MUX: Setup update feature is enabled. Evaluating conditions to determine whether to run setup update.
[0A60:1530][2015-07-10T18:48:06]i000: MUX: Checking http://go.microsoft.com/fwlink/?LinkID=500683 for update.
[0A60:1530][2015-07-10T18:48:07]e000: MUX: Exception: Info: Could not download update data.
[0A60:1530][2015-07-10T18:48:07]e000: MUX: WARNING: For security reasons DTD is prohibited in this XML document. To enable DTD processing set the ProhibitDtd property on XmlReaderSettings to false and pass the settings into XmlReader.Create method.
[0A60:1530][2015-07-10T18:48:07]e000: MUX: Stack: at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res, String arg)
at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at Microsoft.Devdiv.Bootstrapper.DownloadManager.DownloadXml(String url, Int32& returnCode)
[0A60:1530][2015-07-10T18:48:07]i000: MUX: Failed to download the update xml file from http://go.microsoft.com/fwlink/?LinkID=500683 Setup will not be updated.
[0A60:1530][2015-07-10T18:48:07]i052: Condition '(VersionNT = v6.3) AND (WindowsBuildNumber < 9600)' evaluates to false.
[0A60:1530][2015-07-10T18:48:07]i052: Condition 'CompatibilityMode = 0' evaluates to false.
[0A60:1530][2015-07-10T18:48:07]i052: Condition 'NOT((VersionNT > v6.1) OR (VersionNT = v6.1 AND ServicePackLevel >= 1))' evaluates to false.
[0A60:1530][2015-07-10T18:48:07]i052: Condition '(NOT IsLanguagePack) AND ( CurrentOperation = "Install" ) AND ( FLP_Version > v14.0.22823 )' evaluates to false.
[0A60:1530][2015-07-10T18:48:07]i052: Condition 'RebootPending = 1' evaluates to true.
[0A60:1530][2015-07-10T18:48:07]i052: Condition 'NOT (IEsvcVersionExists) OR (IEsvcVersion < v10.0)' evaluates to false.
[0A60:1530][2015-07-10T18:48:07]i052: Condition '(VersionNT < v6.2) AND ((NetworkAvailable = 0) OR (DisableRootAutoUpdate = 1)) AND NOT ((MicrosoftRootCertificateAuthority2011RootExists OR MicrosoftRootCertificateAuthority2011AuthRootExists) AND (MicrosoftRootCertificateAuthority2010RootExists OR MicrosoftRootCertificateAuthority2010AuthRootExists))' evaluates to false.
[0A60:1530][2015-07-10T18:48:07]i052: Condition '( CurrentOperation = "Install" AND EnterpriseExists )' evaluates to false.
[0A60:1530][2015-07-10T18:48:07]i052: Condition '( CurrentOperation = "Install" AND UltimateExists )' evaluates to false.
[0A60:1530][2015-07-10T18:48:07]i052: Condition '( CurrentOperation = "Install" AND NOT EnterpriseExists AND ProfessionalExists)' evaluates to false.
[0A60:1530][2015-07-10T18:48:07]i052: Condition '(VersionNT = v6.3) AND (KB2919355_amd64_CurrentState <> 112 AND KB2919355_x86_CurrentState <> 112)' evaluates to false.
[0A60:1530][2015-07-10T18:48:07]i052: Condition '(VersionNT = v6.3) AND (netfxfullredist_43_DetectKey < v4.5.22816)' evaluates to false.
[0A60:1530][2015-07-10T18:48:07]i000: MUX: Stop Block: SystemRebootPendingBlock : The computer needs to be restarted before setup can continue. Please restart the computer and run setup again.
[0A60:1530][2015-07-10T18:48:07]i000: MUX: Detect Completed
[0A60:1530][2015-07-10T18:48:07]i000: MUX: Wait for View to be loaded
[0A60:139C][2015-07-10T18:48:07]i000: MUX: Detect Completed, now create view
[0A60:1530][2015-07-10T18:48:08]i000: MUX: View loaded
[0A60:1530][2015-07-10T18:48:08]i000: MUX: Stop Block: SystemRebootPendingBlock : The computer needs to be restarted before setup can continue. Please restart the computer and run setup again.
[0A60:1530][2015-07-10T18:48:08]i000: MUX: Go to Blocker page.
[0A60:1530][2015-07-10T18:48:08]i199: Detect complete, result: 0x0
and this is the full log

It seems that from Windows 8 onward shutting down doesn't actually turns the computer off, but rather hibernates it. That causes system files which the installer needed to operate on to continue being used.
You can turn hibernation off by running the following command as an administrator:
powercfg.exe /hibernate off
After running it, restart the computer and the setup should work. You can turn it on again by using
powercfg.exe /hibernate on

You have 2 choices:
Restart PC (not shutdown!)
OR
If you dont want to restart pc, just use ignore-restart.bat script before installation.

You can also go to Control panel; power options; Choose what the power buttons do; Change settings that are currently unavailable; then uncheck the 'Turn on fast startup(recommended)' check box, save the changes then shut down.

I have managed to bypass the same error on Windows 7 x64 by:
emptying Windows Temp folder (usually C:\Windows\Temp), but keeping all files in use
performing a restart

I hit this issue but my problem was something completely different.
The issue was that I was trying to install:
Visual Studio 2015 Update 1 (x86 and x64) - Web Installer (Multiple Languages)
Not:
Visual Studio Professional 2015 with Update 1 (x86 and x64) - Web Installer (English)
The error message is not helpful, but in my case it meant that i didnt have 2015 installed, so the update 1 couldn't be applied.
msdn forum post here for more info:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/6c531ef3-6c95-4dc9-a9a3-d23cc95b09c3/vs2015-update-1-setup-blocked-update-1-does-not-apply-or-is-blocked-by-another-condition-on-your?forum=vssetup

Just go to command prompt and run the below:
SHUTDOWN /r /f /t 0

The problem is because an instance of previous installation required a reboot and the reboot required is still in the registry. Although with reboot the "reboot required" key should have been deleted from the registry, but it is still existing in registry.
The solution is to manually delete the "reboot required" key and then try to setup/uninstall the visual studio.
The key is located in -
"HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{9600393b-6ede-469b-a522-689fce1461d1}.RebootRequired"
Locate the key and delete it. Then try to install/uninstall/repair the visual studio.

Related

My installer package throws 3010 or 1641 when run from SCCM. Works fine if i run as admin

I have a installaer package (mySoftware.exe) which is working fine without any issue when i run manually as admin. But i am getting exit code 3010,1641 when i install the package via SCCM. My code skips the next steps if it gets other than "0" exit code. Right now, my installer consider "0" as Success. Non-Zero are error codes.
Do i need to modify installer script to consider "0","3010","3011","1641","1604" as Success exit code ? Do we need to change anything at SCCM end?
Do i need to consider to add any other exit code as Success? Do we have any other workaround for this issue.
mySoftware.exe /s /v" /quiet ADDLOCAL="mySoftwareConfig" /L*v "%mySoftwareLogFile%" /clone_wait
> My installer script has the following actions:
1)First uninstall existing package on the system.
> 2. Install the new package. (Exit code 3010,1641 returns during installing the new package)
> 3. Configure the package.
Reboot: Those are generally just standard reboot message and you should handle them in your batch file as you suggest yourself.
This is just a mock-up sample (I am no expert at this anymore):
msiexec.exe /I Setup.msi ALLUSERS=1 /L*V %MSILOG% /qb-! ADDLOCAL=ALL
if %errorlevel% == 3010 goto REBOOT
<..stuff here..>
:REBOOT
echo MSIEXEC returned exit code 3010 which means that a reboot is required to complete installation >> %LOGFILE%
Some info on errorlevel:
https://ss64.com/nt/errorlevel.html
https://devblogs.microsoft.com/oldnewthing/20080926-00/?p=20743
MSI Error Messages: https://learn.microsoft.com/en-us/windows/win32/msi/error-codes
0 - ERROR_SUCCESS - The action completed successfully.
1604 - ERROR_INSTALL_SUSPEND - Installation suspended, incomplete.
1641 - ERROR_SUCCESS_REBOOT_INITIATED - The installer has initiated a restart. This message is indicative of a success.
3010 - ERROR_SUCCESS_REBOOT_REQUIRED - A restart is required to complete the install. This message is indicative of a success. This does not include installs where the ForceReboot action is run.
And from other sources:
3011 (0xBC3) - ERROR_SUCCESS_RESTART_REQUIRED - The requested operation is successful. Changes will not be effective until the service is restarted.

Visual Studio 2013 Update 4 isn't installing ( Error: Update 4 does not apply, or is blocked by another condition on your computer.)

I've had Visual Studio 2013 installed for a while, but after experiencing certain issues, thought I would try reinstalling.
I completely removed VS2013, and tried to install the full application with update 4 included... i.e. from the complete 6GB install package.
Immediately after starting the installer, it immediately said:
Update 4 does not apply, or is blocked by another condition on your computer.
Does anyone have any suggestions? The last few lines of the log file is:
[1E08:16F0][2015-01-11T11:02:04]i101: Detected package: sqlsysclrtypes_Sql2014_amd64_rus, state: Obsolete, cached: None
[1E08:16F0][2015-01-11T11:02:04]i101: Detected package: sharedmanagementobjects_Sql2014_x86_rus, state: Absent, cached: None
[1E08:16F0][2015-01-11T11:02:04]i101: Detected package: sharedmanagementobjects_Sql2014_amd64_rus, state: Absent, cached: None
[1E08:16F0][2015-01-11T11:02:04]i101: Detected package: SSDTJuneau_rus, state: Absent, cached: None
[1E08:16F0][2015-01-11T11:02:04]i052: Condition 'NOT (CurrentOperation = "Uninstall")' evaluates to true.
[1E08:16F0][2015-01-11T11:02:04]i052: Condition 'NOT (CurrentOperation = "Uninstall")' evaluates to true.
[1E08:16F0][2015-01-11T11:02:04]i052: Condition 'NOT (CurrentOperation = "Uninstall")' evaluates to true.
[1E08:16F0][2015-01-11T11:02:04]i052: Condition 'NOT (CurrentOperation = "Uninstall")' evaluates to true.
[1E08:16F0][2015-01-11T11:02:04]i052: Condition 'NOT (CurrentOperation = "Uninstall")' evaluates to true.
[1E08:16F0][2015-01-11T11:02:04]i052: Condition 'NOT (CurrentOperation = "Uninstall")' evaluates to true.
[1E08:16F0][2015-01-11T11:02:04]i052: Condition '(CurrentOperation = "Install") OR (CurrentOperation = "Repair")' evaluates to true.
[1E08:16F0][2015-01-11T11:02:04]i000: MUX: Stop Block: NoApplicableUpdates : Update 4 does not apply, or is blocked by another condition on your computer.
[1E08:16F0][2015-01-11T11:02:04]i000: MUX: Detect Completed
[1E08:16F0][2015-01-11T11:02:04]i000: MUX: Wait for View to be loaded
[1E08:1E58][2015-01-11T11:02:04]i000: MUX: Detect Completed, now create view
[1E08:16F0][2015-01-11T11:02:04]i000: MUX: View loaded
[1E08:16F0][2015-01-11T11:02:04]i000: MUX: Go to Blocker page.
[1E08:16F0][2015-01-11T11:02:04]i199: Detect complete, result: 0x0
This issue occurs when you run an update for Visual Studio and don't
have any of the core Visual Studio components installed.
e.g. The file VS2013.5.exe can represent Visual Studio 2013 Update 5.
You may however, still need to install Visual Studio 2013 before running this update.
I had the same problem. I had to install Windows (your O.S.version) SDK
package to solve it.

Install visual studio 2015 "setup blocked" with 10 errors

who can help me about visual studio 2015 install problem ??? preview windows update error
here is the screenshot of the setup blocking:
and here are the errors I get for this setup:
Condition '(VersionNT = v6.3) AND (WindowsBuildNumber < 9600)' evaluates to false.
Condition 'CompatibilityMode = 0' evaluates to false.
Condition 'NOT((VersionNT > v6.1) OR (VersionNT = v6.1 AND ServicePackLevel >= 1))' evaluates to false.
Condition '(NOT IsLanguagePack) AND ( CurrentOperation = "Install" ) AND ( FLP_Version > v14.0.22310 )' evaluates to false.
Condition 'RebootPending = 1' evaluates to false.
Condition 'NOT (IEsvcVersionExists) OR (IEsvcVersion < v10.0)' evaluates to false.
Condition '(VersionNT < v6.2) AND ((NetworkAvailable = 0) OR (DisableRootAutoUpdate = 1)) AND NOT ((MicrosoftRootCertificateAuthority2011RootExists OR MicrosoftRootCertificateAuthority2011AuthRootExists) AND (MicrosoftRootCertificateAuthority2010RootExists OR MicrosoftRootCertificateAuthority2010AuthRootExists))' evaluates to false.
Condition '(VersionNT = v6.3) AND (KB2919355_amd64_CurrentState <> 112 AND KB2919355_x86_CurrentState <> 112)' evaluates to true.
Condition '(Not UltimateVersion_DetectKey) AND ProfessionalVersion_DetectKey AND (ProfessionalVersion_DetectKey < v14.0.22230) AND (CurrentOperation = "Install")' evaluates to false.
Condition '(VersionNT = v6.3) AND (netfxfullredist_43_DetectKey < v4.5.50709)' evaluates to false.
can someone suggest a fix to this setup error?
Your setup is blocked until you install KB 2919355. You will find two methods to install this update in this link. This would definitely unblock it.
UPDATE if these updates are installed successfully, then the problem is because the download package is corrupted, you just need to redownload it and hope it works for you. Even if the package sizes are the same, this should be downloaded again. this could have been caused by interrupted download process.
You'll need to install KB2919442 first before installing KB2919355.
This tutorial can help.
Three Simple Steps to Solve the Problem
Step 1: Before proceeding with the solution, please make sure you are using Windows 8.1 x64 OS;
To find out OS Architecture, Run following command in Command Prompt of Windows (cmd.exe)
C:\Users\sandeep>wmic os get osarchitecture
OSArchitecture
64-bit
Step 2: Download and Install Windows8.1-KB2975061-x64.msu
https://www.microsoft.com/en-in/download/details.aspx?id=43530
Step 3 : Download and Install Windows8.1-KB2919355-x64.msu
https://www.microsoft.com/en-in/download/details.aspx?id=42335
https://www.microsoft.com/en-in/download/details.aspx?id=42335
Note: Second one is little heavier update and will take longer to download as well install. So, please have patience.
Installing-Windows-Update
Once both of above updates are installed. Start Visual Studio 2015 Community Installer once again. This time Installation completes like a charm.
VisualStudioCommunity-Install
Problem Solved!
Credits:
http://beingzero.in/c-sharp-selenium/visual-studio-2015-installation-troubleshooting

Process exited with code 5100 while installing ClickOnce setup built in VS 2013

Similar thread,
I am using Windows 7 Enterprise SP1 64-bit OS. I have created a deployment project with prerequisite as .NET framework 4.5.1 in Visual Studio 2013 professional.
If I launch the .net framework setup separately then I don't observe any problem and it installs properly.
When I launch setup.exe,
- It first shows the EULA screen, I hit ACCEPT button
- It shows Installing progress for .NET framework 4.5.1 (it prompts me to allow permission elevation)
- Suddenly it shows below error and stops.
The log file snap looks like below,
The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = SameSite {string}
Property: [NTProductType] = 1 {int}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 6.1.0 {version}
Running checks for package 'Microsoft .NET Framework 4.5.1 (x86 and x64)', phase BuildList
Reading value 'Release' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full'
Unable to read registry value
Not setting value for property 'DotNet45Full_Release'
The following properties have been set for package 'Microsoft .NET Framework 4.5.1 (x86 and x64)':
Running checks for command 'DotNetFX451\NDP451-KB2858728-x86-x64-AllOS-ENU.exe'
Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': false
Skipping ByPassIf because Property 'DotNet45Full_Release' was not defined
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionNT' and value '6.3.0': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false
Result of running operator 'VersionLessThan' on property 'VersionNT' and value '6.0.0': false
Result of running operator 'ValueEqualTo' on property 'ProcessorArchitecture' and value 'IA64': false
Result of checks for command 'DotNetFX451\NDP451-KB2858728-x86-x64-AllOS-ENU.exe' is 'Install'
Running checks for command 'DotNetFX451\NDP451-KB2859818-Web.exe'
Result of running operator 'ValueNotEqualTo' on property 'InstallMode' and value 'HomeSite': true
Result of checks for command 'DotNetFX451\NDP451-KB2859818-Web.exe' is 'Bypass'
'Microsoft .NET Framework 4.5.1 (x86 and x64)' RunCheck result: Install Needed
EULA for components 'Microsoft .NET Framework 4.5.1 (x86 and x64)' was accepted.
Copying files to temporary directory "C:\Users\user001\AppData\Local\Temp\VSDA8FB.tmp\"
Copying from 'C:\Users\user001\Desktop\NET framework\Products\Release\DotNetFX451\NDP451-KB2858728-x86-x64-AllOS-ENU.exe' to 'C:\Users\user001\AppData\Local\Temp\VSDA8FB.tmp\DotNetFX451\NDP451-KB2858728-x86-x64-AllOS-ENU.exe'
Verifying file integrity of C:\Users\user001\AppData\Local\Temp\VSDA8FB.tmp\DotNetFX451\NDP451-KB2858728-x86-x64-AllOS-ENU.exe
WinVerifyTrust returned 0
File trusted
Running checks for package 'Microsoft .NET Framework 4.5.1 (x86 and x64)', phase BeforePackage
Reading value 'Release' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full'
Unable to read registry value
Not setting value for property 'DotNet45Full_Release'
The following properties have been set for package 'Microsoft .NET Framework 4.5.1 (x86 and x64)':
Running checks for command 'DotNetFX451\NDP451-KB2858728-x86-x64-AllOS-ENU.exe'
Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': false
Skipping ByPassIf because Property 'DotNet45Full_Release' was not defined
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionNT' and value '6.3.0': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false
Result of running operator 'VersionLessThan' on property 'VersionNT' and value '6.0.0': false
Result of running operator 'ValueEqualTo' on property 'ProcessorArchitecture' and value 'IA64': false
Result of checks for command 'DotNetFX451\NDP451-KB2858728-x86-x64-AllOS-ENU.exe' is 'Install'
'Microsoft .NET Framework 4.5.1 (x86 and x64)' RunCheck result: Install Needed
Verifying file integrity of C:\Users\user001\AppData\Local\Temp\VSDA8FB.tmp\DotNetFX451\NDP451-KB2858728-x86-x64-AllOS-ENU.exe
WinVerifyTrust returned 0
File trusted
Installing using command 'C:\Users\user001\AppData\Local\Temp\VSDA8FB.tmp\DotNetFX451\NDP451-KB2858728-x86-x64-AllOS-ENU.exe' and parameters ' /q /norestart /ChainingPackage FullX64Bootstrapper'
Process exited with code 5100
Status of package 'Microsoft .NET Framework 4.5.1 (x86 and x64)' after install is 'InstallFailed'
I don't know what problem it is hitting. Any help in resolving this is much appreciated.
I figured it out that the setup.exe was running in compatibility mode and it was blocking .net framework.
I checked the C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper\Packages\DotNetFX451\Product.xml file and removed the Agrument attribute values just to check what error it is throwing. It threw
Blocking Issue
.NET Framework Setup cannot be run in Program Compatibility Mode.
I removed this compatibility settings from setup.exe and it works fine now.

Visual Studio 2010 SP1 setup project doesn't install SP1 of Visual C++ 2010 Runtime Libraries

I'm using VS 2010 SP1 and I've created a VS setup project to install my app. My app uses a DLL written in C++ so I need to include the VC++ 2010 Runtime Libraries.
One of my users reported getting an error while running my installer and I traced it down to the fact that this user already has the SP1 version of the VC++ 2010 Runtime Library installed. My installer tried to install the non-SP1 version and then quit when it saw a newer version already installed (the SP1 version).
I've confirmed this is the source of the problem here: http://social.microsoft.com/Forums/en/crm/thread/db84d4c3-c58e-4ff9-997f-f4e0116bf043 and http://notepad.patheticcockroach.com/1666/installing-visual-c-2010-and-windows-sdk-for-windows-7-offline-installer-and-installation-troubleshooting/
It seems like the only workaround for users is to uninstall the SP1 runtime library and then run my installer. Obviously this is not ideal so I'm looking for a better solution.
The only one I've come up with is to tell my VS setup project to download the runtime library from Microsoft's SP1 link instead (http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe). I'm a little worried because this feels like a hack. Anyone have any better ideas?
If it's helpful, here's the install log from the user who hit this bug:
The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = HomeSite {string}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 6.1.1 {version}
Running checks for package 'Windows Installer 3.1', phase BuildList
The following properties have been set for package 'Windows Installer 3.1':
Running checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '3.1': true
Result of checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe' is 'Bypass'
'Windows Installer 3.1' RunCheck result: No Install Needed
Running checks for package 'Visual C++ 2010 Runtime Libraries (x86)', phase BuildList
Running MsiProductCheck with ProductCode '{196BB40D-1578-3D01-B289-BEFC77A11A1E}'
MsiQueryProductState returned '-1'
Setting value '-1 {int}' for property 'VCRedistInstalled'
The following properties have been set for package 'Visual C++ 2010 Runtime Libraries (x86)':
Property: [VCRedistInstalled] = -1 {int}
Running checks for command 'vcredist_x86\vcredist_x86.exe'
Result of running operator 'ValueGreaterThanEqualTo' on property 'VCRedistInstalled' and value '3': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false
Skipping FailIf because Property 'Version9X' was not defined
Result of running operator 'VersionLessThan' on property 'VersionNT' and value '5.00': false
Result of checks for command 'vcredist_x86\vcredist_x86.exe' is 'Install'
'Visual C++ 2010 Runtime Libraries (x86)' RunCheck result: Install Needed
Running checks for package 'Microsoft .NET Framework 4 Client Profile (x86 and x64)', phase BuildList
Reading value 'Version' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Client'
Read string value '4.0.30319'
Setting value '4.0.30319 {string}' for property 'DotNet40Client_TargetVersion'
The following properties have been set for package 'Microsoft .NET Framework 4 Client Profile (x86 and x64)':
Property: [DotNet40Client_TargetVersion] = 4.0.30319 {string}
Running checks for command 'DotNetFX40Client\dotNetFx40_Client_x86_x64.exe'
Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': true
Result of checks for command 'DotNetFX40Client\dotNetFx40_Client_x86_x64.exe' is 'Bypass'
Running checks for command 'DotNetFX40Client\dotNetFx40_Client_setup.exe'
Result of running operator 'ValueNotEqualTo' on property 'InstallMode' and value 'HomeSite': false
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'DotNet40Client_TargetVersion' and value '4.0.30129': true
Result of checks for command 'DotNetFX40Client\dotNetFx40_Client_setup.exe' is 'Bypass'
'Microsoft .NET Framework 4 Client Profile (x86 and x64)' RunCheck result: No Install Needed
Installation of components 'Visual C++ 2010 Runtime Libraries (x86)' was accepted.
Copying files to temporary directory "C:\Users\JAGDISH\AppData\Local\Temp\VSD653B.tmp\"
Downloading files to "C:\Users\JAGDISH\AppData\Local\Temp\VSD653B.tmp\"
(14-12-2011 14:03:32) Downloading 'vcredist_x86\vcredist_x86.exe' from 'http://go.microsoft.com/fwlink/?LinkID=177916&clcid=0x409' to 'C:\Users\JAGDISH\AppData\Local\Temp\VSD653B.tmp\'
Download completed at 14-12-2011 14:05:00
Verifying file integrity of C:\Users\JAGDISH\AppData\Local\Temp\VSD653B.tmp\vcredist_x86\vcredist_x86.exe
WinVerifyTrust returned 0
File trusted
Running checks for package 'Visual C++ 2010 Runtime Libraries (x86)', phase BeforePackage
Running MsiProductCheck with ProductCode '{196BB40D-1578-3D01-B289-BEFC77A11A1E}'
MsiQueryProductState returned '-1'
Setting value '-1 {int}' for property 'VCRedistInstalled'
The following properties have been set for package 'Visual C++ 2010 Runtime Libraries (x86)':
Property: [VCRedistInstalled] = -1 {int}
Running checks for command 'vcredist_x86\vcredist_x86.exe'
Result of running operator 'ValueGreaterThanEqualTo' on property 'VCRedistInstalled' and value '3': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false
Skipping FailIf because Property 'Version9X' was not defined
Result of running operator 'VersionLessThan' on property 'VersionNT' and value '5.00': false
Result of checks for command 'vcredist_x86\vcredist_x86.exe' is 'Install'
'Visual C++ 2010 Runtime Libraries (x86)' RunCheck result: Install Needed
Verifying file integrity of C:\Users\JAGDISH\AppData\Local\Temp\VSD653B.tmp\vcredist_x86\vcredist_x86.exe
WinVerifyTrust returned 0
File trusted
Installing using command 'C:\Users\JAGDISH\AppData\Local\Temp\VSD653B.tmp\vcredist_x86\vcredist_x86.exe' and parameters ' /q:a '
Process exited with code 5100
Status of package 'Visual C++ 2010 Runtime Libraries (x86)' after install is 'InstallFailed'
Predefined prerequisites in Visual Studio setup projects are not very good. The fact that they are rarely updated is also a problem.
So the best solution is to create your own custom prerequisite. Visual Studio setup projects do not support custom prerequisite creation. However, it can be done by manually generating the required manifests.
These manifests can be generated automatically with the Bootstrapper Manifest Generator tool.
After generating the package manifests, you can add all these files (including the package) in a separate folder in the Visual Studio prerequisites folder, for example:
C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages
This way you can select the prerequisite in your setup project property pages.
Your custom prerequisite can detect both the original runtime and the SP1. You can find the SP1 detection criteria here: http://blogs.msdn.com/b/astebner/archive/2010/05/05/10008146.aspx
I was able to solve this by adding the target output of my c++ DLL to the setup project. Once I did this, the setup project automatically bundled the appropriate c++ dll's with my installer and now everything runs fine.
The original problem was caused by the fact that I had manually checked "C++ Runtime libraries" in the setup project's prerequisites.
#Cosmin Pirvu -- your solution may work, but this is what I ended up doing.

Resources