I am trying to set the property value to DirectorySearch result. It is working fine for absolute path like Path='C:\Program Files\SampleDir'.But it is failing if I use path like Path='[INSTALLDIR]'.
What I observed in case of path=[INSTALLDIR] it is searching for the file in C drive itself.But here [INSTALLDIR] original value is 'C:\Program Files\SampleDir'.If I change the Depth=2 then it is working fine. Whatever the property that I mention in Path attribute it is searching in C drive only.But it is working fine with absolute value of Path like Path='C:\Program Files\SampleDir'.
The code that I am using is
<Property Id='BACKUPFILESEXIST' Secure='yes' Value='ABC'>
<DirectorySearch Id='DirSearch' Path='[INSTALLDIR]' Depth='0' AssignToProperty='yes'>
<FileSearch Id='FileSearch' Name='EncodeDateAction.dll'/>
</DirectorySearch>
</Property>