0
votes

I have wix bundle with several packages and custom BA. All packages have InstallCondition attribute. All packages individually are installed successfully. But if I install some of the packages, and then try to add others in Modify mode, they are not installed. InstallCondition evaluates to true, and Cache="always". Log looks like this (Package1 is installed, Package2 I want to add):

Detected package: Package1.msi, state: Present, cached: Complete

Detected package: Package2.msi, state: Absent, cached: Complete

...

Setting string variable 'Package1' to value 'true'

Setting string variable 'Package2' to value 'true'

...

Condition 'Package1 = "true"' evaluates to true.

Condition 'Package2 = "true"' evaluates to true.

...

Planned package: Package1.msi, state: Present, default requested: Present, ba requested: Present, execute: None, rollback: None, cache: No, uncache: No, dependency: Register

Planned package: Package2.msi, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None

Also removing part of packages in Modify mode runs successfully.

2
Hi, not sure if I understood this question correctly. You are trying to install some (not all) MSIs part of your custom BA based on an InstallCondition. correct? The DetectPackage state is invoked by the custom BA and based on the current state of the MSIs installed on the target machine, it decides the first stage, i.e DetectedPackage state. IMHO, this is something that the WiX BA does by default, it cannot be overridden. However, based on InstallCondition, you can decide the next action - if that is what you are trying to achieve.ArNumb
@ArNumb no, the problem is that I couldn't understand how to make Burn install packages skipped in first installation. I thought I need LaunchAction Modify and then make InstallCondition evaluated to true by custom BA. I did it, but that wasn't a solution.Kirumata

2 Answers

0
votes

Finally a solved a problem changing LaunchAction = "Modify" to LaunchAction = "Install". That works fine, but I still can't understand how to use LaunchAction = "Modify", why I can delete packages, but can't add.

0
votes

During LaunchAction = "Modify", the engine does not install packages by default. You can see that by the default requested: Absent part of the log. If a custom BA wants to install a package during Modify, it needs to change the requested state during Plan (using the pRequestedState parameter of the OnPlanPackageBegin method). Note that changing the default state can lead to unwanted scenarios such as installing packages while the bundle is being uninstalled, so test thoroughly.