views:

2677

answers:

3

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.

A: 

Ok, I found one solution to my problem:

If I log in as an administrator user and instead of just running my installer by double clicking the msi or setup.exe, if I right click and select "Run as Administrator" my program installs successfully.

Looks like this has to do with the fact that UAC was enabled on the machine. I tried it on a Vista machine with UAC turned off and the installer worked just fine when run normally by an Admin user.

A similar quick and dirty approach to fixing this can be found here

Millhouse
+1  A: 

The solution I've come up with is to distribute customers an EXE with a manifest configured to trigger UAC elevation at the beginning of the install, rather than an MSI (our app must be installed per-machine anyway)

sascha
+1  A: 

The problem has to do with Vista enforcing the NoImpersonate bit on Custom Actions. This was previously ignored by XP.

You cannot set the bit in Visual Studio 2005, but here is a process to go thru to get it to work.

MattH