WiX4: Custom BA for showing MSI UI #7655
-
Not sure how the new WiX API is handling the following scenario. <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:netfx="http://wixtoolset.org/schemas/v4/wxs/netfx" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
<Bundle Name="My Product Bundle" UpgradeCode="6f330b47-2577-43ad-9095-1861bb25889a" Version="1.0.0.0" >
<BootstrapperApplication>
<bal:WixManagedBootstrapperApplicationHost />
<Payload SourceFile="BA.dll" />
<Payload Name="WixToolset.Mba.Host.config" SourceFile="BootstrapperCore.config" />
<Payload SourceFile="bin\Debug\net472\win-x86\mbanative.dll" />
<Payload SourceFile="bin\Debug\net472\win-x86\WixToolset.Mba.Core.dll" />
</BootstrapperApplication>
<Chain>
<MsiPackage Id="MyProductPackageId"
SourceFile="My Product.msi"
bal:DisplayInternalUICondition="WixBundleAction = 6"
bal:PrereqPackage="yes">
</MsiPackage>
</Chain>
</Bundle>
</Wix>
The code above works if the BA is Not sure if Is there some way around? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
i found link from gitbhub and WixTeam itself. #7170. Can you investigate it ? |
Beta Was this translation helpful? Give feedback.
-
With a hint from WiX team I was able to solve it. this.PlanMsiPackage += (object sender, PlanMsiPackageEventArgs e) =>
{
if (e.PackageId == "MyProductPackageId")
e.UiLevel = e.Action == ActionState.Uninstall ?
INSTALLUILEVEL.ProgressOnly :
INSTALLUILEVEL.Full;
}; |
Beta Was this translation helpful? Give feedback.
With a hint from WiX team I was able to solve it.
In a nutshell, it's not possible (at least now) to control this behaviour from outside custom BA (e.g. a magic attribute of
MsiPackage
)The solution is to set the UI in the appropriate
BootstrapperApplication
event: