Omar had a problem: he was using VS 2005 SP1 on Vista to build his Windows Installer setup package for VSTO Outlook Add-In. When he tried to install the package – it was always failing with code 2869. He contacted me with “what is the deal?”, I tracked more folks in VS Setup team and finally got to the bottom of the problem.
His setup has a custom action “SetSecurity” written in managed code (this is because he was following the deployment articles as indicated here). This custom action, which modifies CAS policy, threw the exception but the actuall exception message was never shown to the end user. Since one could not see the actual erro – troubleshooting the CA was nearly impossible.
So, how can you make your Windows Installer show the error messages displayed by the Custom Actions? You would need to manually modify Errors table in the MSI file (use Orca tool to do that) and add the following entry to it – 1001 “Error : ”. Additional bonus to the guys who can make it happen automatically as the post build step J
Finally, I should notice that you would not need to do that when final VS 2005 Sercice Pack for Vista comes out.
[Update 3/9/07: Omar posted his side of the story and he also tells how to do the workaround automatically]