[wix-users] How to evaluate condition after property set

Vanniekerk, Tyrel (GE Healthcare) tyrel.vanniekerk at ge.com
Mon Sep 26 11:23:08 PDT 2016


Hmm, sorry, I might just have answered my own question.  I guess the custom action can just return ActionResult.Failure if the data is invalid, that would stop the install from continuing.  

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Vanniekerk, Tyrel (GE Healthcare)
Sent: Monday, September 26, 2016 1:21 PM
To: wix-users at lists.wixtoolset.org
Subject: EXT: [wix-users] How to evaluate condition after property set

Hi,

I want to validate all the parameters sent to the installer, then check a condition to stop the install if those parameters are invalid.

        <Property Id="PARAMETERS_VALID" Value="1" />
        <Condition Message="[PARAMETERS_MESSAGE]">
            <![CDATA[PARAMETERS_VALID = "1"]]>
        </Condition>
        <InstallExecuteSequence>
            <Custom Action="CheckParameters" Before="InstallInitialize">REMOVE=""</Custom>
        </InstallExecuteSequence>

The custom action CheckParameters sets PARAMETERS_VALID to 0 if the values are incorrect.  Problem is that it seems like the condition gets evaluated right away and never again.  So after setting the variable, the install just continues.

How do I get a condition to evaluate again once the parameter is set or how do I get the custom action to run soon enough?

Thanks,
Tyrel

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=DQICAg&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=oAJIeMTNC3Z6LlnozAjna4bWEZCGLInzcwB6EkZAFeU&m=xu4DKlSGCATiFjKIIWsY58Jy11zikNOxahx4tPNvnyI&s=ATrehOmd1DJXBXuvoWg6zahdgA2PDlOi5end1Ibbm60&e= 


More information about the wix-users mailing list