Hey try changing the level to some negative number..tht should wrk fine

RW-11 wrote:
> 
> Hi,
> 
> I'm trying to turn on and off a feature based on whether a file already
> exists in the installation directory.
> 
> To do this, I'm setting a property based on a FileSearch:
> 
>     <Property Id="XMLFILEEXISTS">
>       <DirectorySearch Id="CheckXMLFileDir" Path="[INSTALLLOCATION]"
> Depth="0">
>         <FileSearch Id="My.XML" Name=" My.XML" />
>       </DirectorySearch>
>     </Property>
> 
> Then, in the feature I have a level condition on it:
> 
>         <Feature Id="MyXML" Level="1" Title="My XML" Description="Select
> to
> permit installer to backup and replace your XML with a clean version.">
>           <ComponentRef Id="MyXMLFiles" />
>           <Condition Level='1000'>
>             XMLFILEEXISTS
>           </Condition>
>         </Feature>
> 
> 
> However, this doesn't appear to work.  Looking in the log files, it
> appears
> that XMLFILEEXISTS is evaluated as part of the AppSearch, which happens
> before the INSTALLLOCATION property is even set, therefore I'm not sure
> where it's looking!
> 
> I could be totally wrong of course... but in the log file, the
> INSTALLLOCATION is set much later than any reference to My.XML.
> 
> Any ideas on what the right way to do this is?
> 
> Many thanks
> 
> RW.
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Condition-based-on-INSTALLLOCATION-tp15233800p15974974.html
Sent from the wix-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to