What is MSI error 2869
It turns out that Error 2869 is the common issue with MSI installations 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"
Even MSI installations provided by Microsoft have to deal with this error which is trying to tell that the user does not have administrative privileges to install. However she does have administrative privileges (lol).
What is User Access Control
This happens because of UAC (user access control) feature of Windows Vista. What is user access control ? To make the long story short - if you are defined as administrator on Vista - you are not.. (lol). You are only temporary granted administrator privileges when running programs.
Therefore MSI Custom Actions that interact with the system and require administrative privileges will fail to run because MSI Custom Actions will impersonate by default.
BTW, quick workaround will be running:
msiexec /i MySetup.msi
from a command line prompt as administrator.
It is possible to mark Custom Actions as msidbCustomActionTypeNoImpersonate in MSI. So one can edit MSI with ORCA and patch Custom Actions table updating Type column to be msidbCustomActionTypeNoImpersonate according to the Custom Action In-Script Execution Options table. Usually it will be enough to add 1024 to the Type column in the Custom Actions for Custom Actions of install, uninstall, rollback and commit (anyway - those that require administrative privileges).
Visual Studio 2005
Bonus for Visual Studio 2005 developers. I advice to use WiRunSQL.vbs to patch MSI automatically (Google for it :)). Go to the properties of your setup project and define post-build event that utilizes WiRunSQL.vbs. Like so:
@echo off cscript /nologo "WiRunSQL.vbs" "MySetup.msi" "UPDATE CustomAction SET Type = 3585 WHERE Type = 1537"
Friday, July 20, 2007 5:23 PM