Hi!

I develop a merge module and have directory structure is like this:


<Directory Id="TARGETDIR" Name="SourceDir">

    <Directory Id="ProgramFilesFolder">

        <Directory Id="CLUPDIR" Name="ClUp">

            <Directory Id="AGENTDIR" Name="Agent">

            ...

I would like to run custom action based on some condition. The condition comes 
from verification of file presence. That's why I have a property filled with 
verification result.

<Property Id="DBEXISTS">

    <DirectorySearch Id="AGENTDIRSEARCH" Path="[AgentDirToSearch]" Depth="0">

        <FileSearch Id="DBSEARCH" Name="CLUPAgent.sdf"/>

    </DirectorySearch>

</Property>


As you might noticed, my DirectorySearch element uses AgentDirToSearch property 
in its Path attribute.
This property is set  by custom action

<CustomAction Id="SetAgentDirToSearch" Property="AgentDirToSearch" 
Value="[CLUPDIR]Agent" Execute="immediate"/>

schedule after InstallInitialize:

<InstallExecuteSequence>

    <Custom Action='SetAgentDirToSearch' After='InstallInitialize' />

    ...


What I observe is, that DBEXISTS property is never set. If I use explicit path 
to the directory like, C:\Program Files\ClUp\Agent, then it works. Why is that?
Does it have something to do when property DBEXISTS is assigned? And then how 
to schedule it to happen after referenced property is set?

Thanks in advance for all suggestions.

P.S.
Initially I've used just [AGENTDIR] in the DirectorySearch element but (most 
likely due to trailing backslash) it didn't work.


Regards,
Tomek Romanowski

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to