May 04, 2007

Installer Error Code 2869 on Windows Vista, and how to correctly use the "NoImpersonate" flag for custom installer actions in Visual Studio 2005

If you have an installer for a Windows application that uses a custom action step during the installation process, you will likely hit this error message when trying to run that installer on Windows Vista:

"The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2869"

The reasons this error shows up is ultimately because Windows Vista now enforces the original architectural intent of the "NoImpersonate" attribute bit, as Robert Flaming explains in his blog posting:
http://blogs.msdn.com/rflaming/archive/2006/09/23/768248.aspx

Omar Shahine describes the error message situation in more detail in his blog posting:
http://www.shahine.com/omar/VSTOAddinsAndVista.aspx

Aaron Stebner summarizes the installer problem well, and describes the necessary steps to solve the problem by correctly setting up installer custom actions correctly in Visual Studio:

Question: I have built an installer using the Visual Studio 2005 setup project wizard. It installs correctly on Windows XP but fails on Windows Vista. I investigated and found that the failure on Windows Vista is caused by a custom action that fails with an access denied error. However, I am running the setup with elevated privileges in Windows Vista. How can I fix my setup so it will work correctly on Windows Vista?

http://blogs.msdn.com/astebner/archive/2006/10/23/mailbag-how-to-set-the-noimpersonate-flag-for-a-custom-action-in-visual-studio-2005.aspx

Entry categories: Dot NET Microsoft Programming
Posted by Jorgen Thelin at May 4, 2007 12:42 PM - [PermaLink]