igorsp7
igorsp7

Reputation: 451

Wix installer - Error 1925 in Silent or Passive mode, but works fine in interactvie

I have an MSI installer built with Wix. It does not require elevated privileges, having ALLUSERS=2 and MSIINSTALLPERUSER=1. It works fine in the user unteractive mode, but fails when launched from a non-elevated command prompt in the silent (/qn) or passive (/passive) mode.

The error in the log appearing straight after "Action start: InstallFinalize":

Error 1925. You do not have sufficient privileges to complete this installation for all users of the machine.  Log on as administrator and then retry this installation.

Interestingly, if I run the installer from an admin command prompt in the silent mode, it succeeds. It installs into the per-user folder and writes registry to HKCU as expected, but when I uninstall it, it triggers the UAC elevation prompt, which suggests that there's some component there that has been installed per-machine, rather than per-user. Again, this does not happen if it was installed in the user-interactive mode.

Any help will be much appreciated.

Upvotes: 0

Views: 426

Answers (1)

igorsp7
igorsp7

Reputation: 451

It turned out that the problem was with the ALLUSERS property. I had a custom action that set its value either to 1 or nothing before FindRelatedProducts to match the scope of any previously installed version so that it can be properly upgraded. Then, there was another custom action that reset the value of ALLUSERS back to 2 and set MSIINSTALLPERUSER appropriately instead. The problem was with that second custom action - apparently you shouldn't reset the value of ALLUSERS to 2 in the InstallExecuteSequence, but it's fine to do so in InstallUISequence.

Upvotes: 0

Related Questions