Add file conditionally

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Add file conditionally

krosty
This post has NOT been accepted by the mailing list yet.
This post was updated on .
I am trying to add a file to the installer like this in my main wxs file.

    <ComponentGroup Id="Files" Directory="Bin">
        <?if $(var.FILE_EXISTS) = "true"?>
            <Component>
                <Condition>$(var.FILE_EXISTS) = "true"</Condition>
                <File Source="$(var.SourceDir)/file.txt"/>
            </Component>
       <?endif?>
    </ComponentGroup>

I have the property declared like this.

 <Property Id="FILE_EXISTS" Value="true" />

But its not taking effect. Its  not getting added. It works when I don't have the condition.  Any ideas?
Reply | Threaded
Open this post in threaded view
|

Re: Add file conditionally

krosty
This post has NOT been accepted by the mailing list yet.
This post was updated on .