VS setup project register search launch condition - visual-studio

Using a Visual Studio setup project (vdproj), I need to add a launch condition that checks for a registry value.
As you can see below I am checking for HKEY_LOCAL_MACHINE\SOFTWARE\Search Company.\Software 2020 (64-bit) and looking for value of Path.
The installer fails and looking at the windows installer log, I see that it is looking for HKEY_LOCAL_MACHINE32 :
MSI (c) (AC:30) [08:11:45:184]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE32\SOFTWARE\Search Company.\Software 2020 (64-bit) 3: 2
Why is it looking for the root HKEY_LOCAL_MACHINE32 and how can I handle this?

Related

AtmelStudio 7 installation failed for avr8 device support package

I am trying to install AtmelStudio 7 on Windows 7, but the installation stopped after some time. The following error message is shown:
An error occured
AVR8 Device Support
What i tried so far:
I took also a quick look at Atmel-FAQ, but the suggested solution (call as-installer-*.exe SHELLCOMMAND=/NoWeb /NoRefresh /NoRestart) did result in the same error message.
I scanned the log messages, but failed to find something helpful.
Remove all Atmel components and drivers by using the Windows uninstall mechanism
Question
Has anybody an idea how to get AtmelStudio 7 installed?
Update
I solved the installation problem as follows:
The error indicated that the IDE installation is corrupt chances are the registry keys are messed up.
1) Go to a command prompt and run the following command
wmic product where "vendor like 'Atmel%'" get Name, Version
This will list the product which are part of the machine and comes from Atmel. If it lists either 'Atmel Studio IDE 7.0' or 'Atmel Studio Development Environment' chances are component is not uninstalled properly.
2) In order to clean up the above component use a third party utility(http://www.revouninstaller.com/revo_uninstaller_free_download.html) to remove the above components from the system.
Note: In order for Revo Uninstaller to list the above components go to Tools->Options->Show System components and check it.
3) After the clean up of the above component and registry to verify the clean up succeeded run the following command again.
wmic product where "vendor like 'Atmel%'" get Name, Version
If the clean up was successful it should not list 'Atmel Studio IDE 7.0' or 'Atmel Studio Development Environment'.
4) Now you can install Atmel Studio.
I also had the error after having uninstalled Atmel Studio 7.0.582.
Unfortunately, it messed up the registry, such that I could not use the "wmic" program (it just does not anything for an eternity).
After some hours of searching, I found this Microsoft tool for fixing install/uninstall issues:
https://support.microsoft.com/en-us/help/17588/fix-problems-that-block-programs-from-being-installed-or-removed
Using that is easy and the steps described above very similar:
Choose "Problems with uninstalling" (or something like that)
Find and select either 'Atmel Studio IDE 7.0' or 'Atmel Studio Development Environment'
Apply the corrections
After that, I was able to install AS 7.0.1006 sucessfully.
Here I have the same failure on a laptop running win7
When I checked the log files found the following error, but I still have not been able to fix it...
Property(S): INSTALLLEVEL = 1
Property(S): SOURCEDIR = C:\ProgramData\Package Cache\{C327F1B0-01E9-45BB-AE07-AD204C992A31}v7.0.922\
Property(S): SourcedirProduct = {C327F1B0-01E9-45BB-AE07-AD204C992A31}
Property(S): ProductToBeRegistered = 1
MSI (s) (58:48) [13:08:41:248]: Note: 1: 1708
MSI (s) (58:48) [13:08:41:249]: Note: 1: 2205 2: 3: Error
MSI (s) (58:48) [13:08:41:249]: Note: 1: 2228 2: 3: Error 4: SELECT Message FROM Error WHERE Error = 1708
MSI (s) (58:48) [13:08:41:249]: Note: 1: 2205 2: 3: Error
MSI (s) (58:48) [13:08:41:249]: Note: 1: 2228 2: 3: Error 4: SELECT Message FROM Error WHERE Error = 1709
MSI (s) (58:48) [13:08:41:249]: Product: AVR8 Device Support — Installation failed.
MSI (s) (58:48) [13:08:41:250]: Windows Installer installed the product. Product Name: AVR8 Device Support. Product Version: 7.0.922. Product Language: 1033. Manufacturer: Atmel. Installation success or error status: 1603.
MSI (s) (58:48) [13:08:41:255]: Deferring clean up of packages/files, if any exist
MSI (s) (58:48) [13:08:41:255]: MainEngineThread is returning 1603
MSI (s) (58:D4) [13:08:41:259]: RESTART MANAGER: Session closed.
MSI (s) (58:D4) [13:08:41:259]: No System Restore sequence number for this installation.
=== Logging stopped: 7/3/2016 13:08:41 ===
MSI (s) (58:D4) [13:08:41:264]: User policy value 'DisableRollback' is 0
MSI (s) (58:D4) [13:08:41:264]: Machine policy value 'DisableRollback' is 0
MSI (s) (58:D4) [13:08:41:264]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (58:D4) [13:08:41:267]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (s) (58:D4) [13:08:41:268]: Restoring environment variables
MSI (s) (58:D4) [13:08:41:269]: Destroying RemoteAPI object.
MSI (s) (58:50) [13:08:41:269]: Custom Action Manager thread ending.
MSI (c) (FC:64) [13:08:41:282]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (FC:64) [13:08:41:283]: MainEngineThread is returning 1603
=== Verbose logging stopped: 7/3/2016 13:08:41 ===</code><br/>
Maybe these resources helps you.
https://support.microsoft.com/en-us/kb/834484
http://www.avrfreaks.net/comment/1922756#comment-1922756
If anybody knows what's going wrong, please let us konw !
Thanks !
Another issue that happened to me is hanging the installation at
Atmel Studio Development Environment Applying
Details: Initializing environment
And the useful solution is killing the AtmelStudio.exe (*32) process which was apparently running in the background as part of the installation process.
The following link is where I found the solution:
http://www.avrfreaks.net/comment/1918991#comment-1918991
And finally after some seemingly scary steps...!

MSI Install Failed - Error 1723

I'm having trouble installing our software on certain machines when installing our .msi built in VS2015.
Without VS2015, I get this in the log file:
MSI (s) (24:64) [11:21:22:095]: Doing action: InstallFinalize
Action 11:21:22: InstallFinalize.
Action start 11:21:22: InstallFinalize.
MSI (s) (24:64) [11:21:22:095]: User policy value 'DisableRollback' is 0
MSI (s) (24:64) [11:21:22:095]: Machine policy value 'DisableRollback' is 0
Action 11:21:22: RollbackCleanup. Removing backup files
MSI (s) (24:64) [11:21:22:585]: Creating MSIHANDLE (13) of type 790536 for thread 8036
MSI (s) (24:74) [11:21:22:595]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIAE3F.tmp, Entrypoint: _KSTInstallSC#4
MSI (s) (24:74) [11:21:22:595]: Generating random cookie.
MSI (s) (24:74) [11:21:22:645]: Created Custom Action Server with PID 1160 (0x488).
MSI (s) (24:5C) [11:21:22:765]: Running as a service.
MSI (s) (24:5C) [11:21:22:775]: Hello, I'm your 32bit Elevated Non-remapped custom action server.
CustomAction _3F7B94EF_231A_421E_BF8B_C0760F3B266E returned actual error code 1157 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (24:74) [11:21:22:975]: Closing MSIHANDLE (13) of type 790536 for thread 8036
MSI (s) (24:64) [11:21:22:975]: Note: 1: 1723 2: _3F7B94EF_231A_421E_BF8B_C0760F3B266E 3: _KSTInstallSC#4 4: C:\Windows\Installer\MSIAE3F.tmp
MSI (s) (24:64) [11:21:22:975]: Note: 1: 2262 2: Error 3: -2147287038
MSI (c) (8C:0C) [11:21:22:975]: Note: 1: 2262 2: Error 3: -2147287038
DEBUG: Error 2835: The control ErrorIcon was not found on dialog ErrorDialog
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2835. The arguments are: ErrorIcon, ErrorDialog,
Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action _3F7B94EF_231A_421E_BF8B_C0760F3B266E, entry: _KSTInstallSC#4, library: C:\Windows\Installer\MSIAE3F.tmp
MSI (s) (24:64) [11:21:25:796]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (24:64) [11:21:25:796]: Product: KST -- Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action _3F7B94EF_231A_421E_BF8B_C0760F3B266E, entry: _KSTInstallSC#4, library: C:\Windows\Installer\MSIAE3F.tmp
I have looked in Visual Studio and there are no custom actions that match anything in the log file.
Something to note, after installing VS2015 on a test PC, the installation worked fine, so it's definitely missing a DLL or something. But installing VS2015 on all of our clients' machines isn't practical.
Is there any way I can package the files needed along with the msi? And if so, how can I find the name of the depended DLL files?
Depending on how you built this package, there's probably a better way to track this down in the project. But let's pretend we received this package and want to make it work despite it being faulty.
You know the entry point is _KSTInstallSC#4, which gives you something to look for in the Target column of the CustomAction table in the built MSI using your favorite MSI editing program. The record in that table should refer with its Source column to a row in the Binary table that contains the DLL. Once you extract that DLL, you can use any tool that shows you dependencies, such as Dependency Walker, CFF Explorer, or even dumpbin /imports.
As for how to fix it, on a single machine just install the dependency. But to fix it in the package, you will probably have to change how the DLL is being built. For instance, you might make it import the C++ runtime statically so it has no unusual external run time dependencies.
You've done something related to the KST product, it's a C++ application that apparently you're running as a custom action, either deliberately or through including a merge module. Error 1157 indicates a failure to load, so it must have a dependency on at least one other Dll that isn't installed.
Judging by the GUID appended (3F7B94EF_231A_421E_BF8B_C0760F3B266E) to the custom action name I would say you have a merge module included into your package/project, that runs this custom action, just as Phil mentioned.
I had the same issue just recently, and in my case it was Windows Defender that had a false positive on that tmp-file that is mentioned in the MSI log as the DLL that it can't find. Defender identified it as a virus and removed the file before MSI package could use it.
So, try disabling Defender/any other Antivirus software and try again.
For me helped answer by Michael Urman
I compilled library in VS2019 in Release mode so in library dependences I saw vcruntime140.dll (pic. from CFF Explorer) and this DLL I could find in C:/Windows/System32 . This librares you can install through C++ Redistributable packedges.
For more explanation of problem - in previous I compilled project in Debug mode and as dependency in DLL I saw vcruntime140D.dll - and on machine without VS I got error Error 1723 on my Custom Action

WIX Custom Action Execution failed

I have created a setup to execute scripts on database. But when i tried to run the setup i have got the following error which i have fetched out from logs.
Doing action: VerifyConnection Action 12:03:17: VerifyConnection.
Action start 12:03:17: VerifyConnection. MSI (c) (38:E0)
[12:03:17:739]: Invoking remote custom action. DLL: C:\Users\adityak\AppData\Local\Temp\MSI4F99.tmp, Entrypoint: VerifyConnection MSI (c) (38:A4) [12:03:17:741]: Cloaking enabled. MSI (c) (38:A4)
[12:03:17:741]: Attempting to enable all disabled privileges before calling Install on Server MSI (c) (38:A4)
[12:03:17:742]: Connected to service for CA interface. MSI (c) (38:54)
[12:03:17:788]: Note: 1: 1723 2: VerifyConnection 3: VerifyConnection 4: C:\Users\adityak\AppData\Local\Temp\MSI4F99.tmp Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action VerifyConnection, entry: VerifyConnection, library: C:\Users\adityak\AppData\Local\Temp\MSI4F99.tmp MSI (c) (38:54)
[12:03:19:186]: Product: CRMnext -- Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action VerifyConnection, entry: VerifyConnection, library: C:\Users\adityak\AppData\Local\Temp\MSI4F99.tmp
Action ended 12:03:19: VerifyConnection. Return value 3.
DEBUG: Error 2896: Executing action VerifyConnection failed
Any Idea how to resolve this issue???
Make sure your action has the correct signature; especially the method needs to be "public" and "static", i.e. something along the lines of "public static ActionResult doSomething(Session session)"
Mark the mehtod with the "CustomAction" attribute, so it gets exported
When dealing with multiple custom actions implemented in one dll, make sure you are not running into a known MakeSfxCA bug (cf. http://wixtoolset.org/issues/4502/ or Adding a new Custom Action to a project prevents an existing Custom Action from being run)

MSI Installer Fails Remotely - "A Newer Version" is already installed, even after uninstalling

Rather bizarre behavior I've started having with our automated builds. I have a very simple, windows service .msi (built in Visual studio 2010) that is compiled on our central build/repo server, gets uploaded to our dev server, and is then remotely installed from the build/repo server (command-line via ssh using plink) on the dev server.
This was working for a long time until recently the automated builds started failing 100% of the time. The verbose installation logs for the msi state that "A newer version of this product is already installed." I remoted into the dev server, checked the msi, and had no problem manually installing it myself on the server (via command-line and GUI). I then uninstalled the service from the "Programs & Features" window, verified the files and entries were deleted, tried again to install it remotely from the build server, and got the exact same error again. The service just doesn't install remotely because it thinks a newer one is still installed (even though I already uninstalled it), but I can do it manually myself.
EDIT
Adding some of the log text.
Action start 15:47:16: AppSearch.
MSI (s) (B8:F0) [15:47:16:265]: Doing action: FindRelatedProducts
Action ended 15:47:16: AppSearch. Return value 1.
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
Action start 15:47:16: FindRelatedProducts.
MSI (s) (B8:F0) [15:47:16:267]: PROPERTY CHANGE: Adding NEWERPRODUCTFOUND property. Its value is '{4E9314AB-F84B-4628-BAFF-19A8B785A3B0}'.
MSI (s) (B8:F0) [15:47:16:268]: Doing action: ERRCA_CANCELNEWERVERSION
Action ended 15:47:16: FindRelatedProducts. Return value 1.
MSI (s) (B8:F0) [15:47:16:269]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'ERRCA_CANCELNEWERVERSION'
Action start 15:47:16: ERRCA_CANCELNEWERVERSION.
MSI (s) (B8:F0) [15:47:16:269]: Product: Product.Services -- Unable to install because a newer version of this product is already installed.
Unable to install because a newer version of this product is already installed.
Action ended 15:47:16: ERRCA_CANCELNEWERVERSION. Return value 3.
Action ended 15:47:16: INSTALL. Return value 3.
I was receiving the same exact error as #Tom was getting: "- Newer version already installed"
I was able to fix by following these exact steps:
1. Run the MSI with verbose logging enabled
msiexec /i "{Path to msi}.msi" /L*V "c:\myLog.log"
2. Open the log file that was produced from the above command and copy the GUID that is shown in the line
FindRelatedProducts: Found application: {FB0B54D2-9C47-4196-BF0E-B6EEBF754E22}
Using the copied GUID, run the following command
msiExec /x {FB0B54D2-9C47-4196-BF0E-B6EEBF754E22}
At this point, the old service was uninstalled and I then proceeded to install the service with MSI without any issues. Hope this helps.
MSI (s) (B8:F0) [15:47:16:267]: PROPERTY CHANGE: Adding NEWERPRODUCTFOUND property. Its value is '{4E9314AB-F84B-4628-BAFF-19A8B785A3B0}'.
It sounds like there is an old version of the install on the machine somewhere even though it may not show up in Programs and Features. I would try the following to see if it fixes your problem:
Try uninstalling via commandline msiexec /x {4E9314AB-F84B-4628-BAFF-19A8B785A3B0}
Search for the product code {4E9314AB-F84B-4628-BAFF-19A8B785A3B0} in the registry to see if there are remnants of a previous installation. If you find that product code, you can try manually deleting those entries (AT YOUR OWN RISK) to see if that solves your problem.
Another solution that worked for me was:
Select your Setup project in the VS solution and press F4 to show the properties window
Change GUID for ProductCode and UpgradeCode by clicking the button at right of this values. A new modal window will appear and you only have to press button 'new code'
Keep in mind that previous installations will remain in the Windows registry and you should uninstall them. This is only in case you have same GUID for different VS setup due to a mistake (for example using a setup template)
If you select setup file in Solution Explorer and press F4 you will get properties of Setup file.
Set property "DetectNewerVersion" as false and Reinstall
Best of Luck

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