[wix-users] Issue with Feature Conditions for Merge Modules (For Non Admin installation)

Griesshammer, Christoph (GE Healthcare) christoph.griesshammer at ge.com
Wed Aug 26 11:12:43 PDT 2015


>From someone else on my team (having issues with emailing the list serv):


Hello,

I am trying to put 'Condition' for installing the Merge Modules, based on whether the installer has admin privileges or not.

The package scope is:
 InstallScope="perUser"
 InstallPrivileges="limited"

I am setting a session variable 'ADMIN_INSTALL' (using a Custom action) if the user is an Administrator or the executing process has elevated privileges.
The custom action is set in the LaunchConditions (in both InstallExecute and UI sequences)

In the WIX code, I have:


<Feature Id="ForAdmin" Level="0" Display="hidden">

<Condition Level="1">ADMIN_INSTALL</Condition>

<MergeRef Id="Microsoft_VC90_ATL"/>

<MergeRef Id="Policy_VC90_ATL"/>

<MergeRef Id="Microsoft_VC90_CRT"/>

<MergeRef Id="Policy_VC90_CRT"/>

<MergeRef Id="Microsoft_VC90_MFC"/>

<MergeRef Id="Policy_VC90_MFC"/>

</Feature>

The desire is to enable the Feature (And install the merge modules) if 'ADMIN_INSTALL' exists.

This solution is working fine for 'Administrative Install', however, when I am running as 'Non-Admin', I am getting the following error:

"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'.

This is happening only with the 'Merge Modules', as the same Feature Condition is working for SystemFolders, Registry write etc. (For 'Admin' it is delivering files to System Folder, writing to registry, whereas for 'Non-Admin' those activities are skipped).

The package works fine for 'Non-Admin' install if I remove the 'Merge Module' feature, which is just not an option.

Appreciate if you please provide me suggestions.

Thanks,

Krishnendu Das (Kris Das)



More information about the wix-users mailing list