.net – MSI Error Code 2869 on Vista

installationnetwindows-installerwindows-vista

I have an MSI for a .NET application that I created using Visual Studio 2005 that includes a custom action to write some registry keys at the end of the install. I found that the installer works fine on Windows XP SP2 and SP3. However, when I try to run the installer on a Vista PC, the installer seems to get almost all the way to the end, but then dies and rolls back giving an Error Code 2869.

I logged in with an account that is an Administrator, but I still get the same error.

Best Answer

I found the definitive answer to this problem. Error 2869 is a meaningless error that means "Can't display the error for the real problem". The real error is obscured. In many cases, that error has to do with impersonation, but not always!

This solution both fixes the error display bug, and also fixes the Impersonation/Admin priv issue on Vista and Windows 7.

The one thing that is missing is the hand-holding (for someone that doesn't want to know anything about javascript, like me) to get this to work.

  1. visit http://blogs.msdn.com/b/nikhiln/archive/2007/04/25/post-build-script-to-fix-msi-issues-in-vista-for-vs-2005-setup-and-deployment-project.aspx

  2. Grab the script, and save it to your Deployment project folder as PostBuildVistaFix.js

  3. Bring up the Deployment Project Properties
  4. Changed PostBuildEvent to

    cscript.exe ..\PostBuildVistaFix.js your_installer.msi