I have a bootstrapper with custom UI, 1 msi package and some prerequisites. What I want to do is to do the detection of prerequisites in custom UI and then overwrite one of the variables in bundle element to either install the prerequisite or not.
So basically:
<Variable Name="VCRedist2010SP1_x86" Value="TRUE"/>
<Chain>
<ExePackage Id="VCRedist2010SP1_x86" Cache="no" Compressed="yes" PerMachine="yes" Permanent="yes" Vital="yes" InstallCommand="/q"
SourceFile="E:\Redist\vcredist_2010_SP1_x86.exe"
DetectCondition="NOT VCRedist2010SP1_x86"/>
...
</Chain>
And then from my UI I overwrite the VCRedist2010SP1_x86
variable.
The problem is that the check of the DetectCondition
occurs before I overwrite the variable. Here's the log:
Condition 'NOT VCRedist2010SP1_x86' evaluates to false.
Setting string variable 'VCRedist2010SP1_x86' to value 'FALSE'
The question is if it can work like this at all or do I always have to do the detection inside XML with RegistrySearch, for instance?
The reason for it is that I call Detect
too early in the process, I need to call it later and be careful as it's async. I probably need to listen for DetectComplete
event.
But my bigger problem that there's no Boolean
type variables. I ended up using:
<Variable Name="VCRedist2010SP1_x86" Value="0" Type="numeric"/>
and compare it like this:
DetectCondition="VCRedist2010SP1_x86 = 1"