0

I have a Chain with Exe1->Msi1->Exe2->Msi2.

I need a FileSearch result to decide if Exe2 is installed in its InstallCondition.

I have a FileSearch defined in a Fragment outside the Bundle and I am referring to it in the Bundle above the Chain.

How can ensure that the FileSearch is done after Msi1 is executed?

Similar question using RegistrySearch instead of FileSearch with one MsiPackage: WiX Bundle bal:condition - util:RegistrySearch variable always false

UPDATE: I have removed Exe2 from the Chain and I am trying to execute Exe2 in a deferred custom action from Msi1. Exe2 can run by itself but fails when run from the custom action. Need to dig deeper

Community
  • 1
  • 1
Ranjith Venkatesh
  • 1,322
  • 3
  • 20
  • 57
  • possible duplicate of [How to set InstallCondition for ExePackage in Chain based on file contents?](http://stackoverflow.com/questions/17896071/how-to-set-installcondition-for-exepackage-in-chain-based-on-file-contents) You're asking a bit different question, but semantically it is very close to the other one – Yan Sklyarenko Jul 29 '13 at 11:50
  • Yes, you may close this question or leave it for the semantic difference. – Ranjith Venkatesh Jul 29 '13 at 12:31

2 Answers2

3

Burn doesn't work that way. It processes InstallCondition before the chain starts being applied so nothing that happens during the chain affects the rest of the chain.

Bob Arnson
  • 21,377
  • 2
  • 40
  • 47
0

Like Bob mentioned the InstallCondition is processed before the chain starts and not in between.

Would the MSI1 always contain the file you want to search? Instead of checking the existence of file why dont you just check if the MSI1 was installed properly? If this is the case, you can make use of the VITAL attribute.

Vital YesNoType Specifies whether the package must succeed for the chain to continue. The default "yes" inidicates that if the package fails then the chain will fail and rollback or stop. If "no" is specified then the chain will continue even if the package reports failure.

So your regular Burn BA won't support, you can either write a custom BA to handle this or break your chain to 2 , exe1 and msi1 and the second one exe2 msi2.

Isaiah4110
  • 9,855
  • 1
  • 40
  • 56
  • Msi2 is mandatory has to be run in the chain. Exe2 is the optional package which needs to installed based on the selection made by the client in the custom dialogs in Msi1. – Ranjith Venkatesh Jul 31 '13 at 09:06
  • How does splitting the chain help? Can I then make a master chain which supports conditions to opt out Exe2? – Ranjith Venkatesh Aug 04 '13 at 10:47
  • Keep it simple :) based on the user selection set a registry value or create a new file entry. Read it in chain2. – Isaiah4110 Aug 04 '13 at 12:33