Adrian,
I haven't tried this but what I would do is when you declare your Property -
omit the Value attribute.
This way the property will be undefined.
Then when you are checking use something like:

    <Feature Id="ProductFeature" Title="MainFeature" Level="1">
      <Feature Id="FeatureToInstallWhenOCXMissing" Display="hidden"
Level="1">
        <Condition Level="0"><[FOUNDTABCTL32]></Condition>
        <ComponentRef Id="ProductComponent"/>
      </Feature>
    </Feature>

This way when the FileSearch finds something then [FOUNDTABCTL32] will be
defined and the condition will hold, thereby setting the
FeatureToInstallWhenOCXMissing Level="0"

Tell me if this helps at all,
Alexei


Adrian Gantoi wrote:
> 
> Hi all,
> 
> I'm having a problem with correctly specifying the Feature's Condition.
> My goal - make a search of an ocx file, and if the ocx file does not exist
> on the target computer,
> keep a feature selected for installation.
> If the ocx exists, the feature should be automatically deselected.
> I'm currently having doubts if this is possible, since FileSearch should
> return a string...
> My code below:
> 
>     <Property Id="FOUNDTABCTL32" Value="o" Secure="yes">
>       <FileSearch Id="FOUNDTABCTL32" Name="tabctl32.ocx"/>
>     </Property>
> 
>     <Feature Id="ProductFeature" Title="MainFeature" Level="1">
>       <Feature Id="FeatureToInstallWhenOCXMissing" Display="hidden"
> Level="1">
>         <Condition Level="0"><![CDATA[FOUNDTABCTL32]]></Condition>
>         <ComponentRef Id="ProductComponent"/>
>       </Feature>
>     </Feature>
> 
> Am I doing something wrong or this is not possible ?
> 
> Thanks for any help,
> Adrian
> 

-- 
View this message in context: 
http://www.nabble.com/Feature-element---Condition-nightmare-tf4279047.html#a12179726
Sent from the wix-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to