开发者

How to ensure a feature is installed during a Windows Installer AdminInstall

开发者 https://www.devze.com 2023-02-19 02:42 出处:网络
I am using WiX to create a moderately complex installer. I have a Level 0 Feature that I would like to install conditionally, but also always during an Admin install, to make patching through admin im

I am using WiX to create a moderately complex installer. I have a Level 0 Feature that I would like to install conditionally, but also always during an Admin install, to make patching through admin images easier. I've tried several things:

  1. Setting a property before the AdminUISequence's CostFinalize action (which is when msdn claims the Condition table is evaluated). The condition in that case looks like:

    <Condition Level="1">( VersionNT >= 601 AND NOT FASTINSTALL = "1" ) OR INSTALLCONDFEATURE = "1"</Condition>

    where FASTINSTALL and INSTALLCONDFEATURE are both Secure and Admin.

  2. Using the Windows Installer ACTION or EXECUTEACTION properties. In this case the condition 开发者_StackOverflowis something like:

    <Condition Level="1">( VersionNT >= 601 AND NOT FASTINSTALL = "1" ) OR ACTION = "ADMIN"</Condition>

Neither of these seem to work. Am I just missing something here, or is there a different, better way to do this?


A feature with Feature/@Level="0" will never be installed in an admin install, per the MSI SDK:

During an administrative installation, the installer creates a source image for all features in the product except those feature with 0 in the Level column of the Feature table.

So you need to reverse your logic; set the feature level to something greater than zero and use Conditions to set it to zero for non-admin installs.

0

精彩评论

暂无评论...
验证码 换一张
取 消