0

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>
123r789
  • 1,600
  • 3
  • 22
  • 33
  • you should rephrase your question. It does not make sense - you say that [INSTALLDIR] is C:\Program files\sample dir, but it's ABSOLUTE path already?! Also, try Path='"[INSTALLDIR]"' – Erti-Chris Eelmaa May 20 '14 at 19:01
  • If I use Path='"[INSTALLDIR]"' it is giving error ICE03 invalid full path. – 123r789 May 21 '14 at 06:04
  • 1
    value assigned to INSTALLDIR directory ref is after AppSearch is done.The above code is executing as part of AppSearch.Thats why it is not taking the [INSTALLDIR] value.How can I make the above code to work. – 123r789 May 21 '14 at 06:53
  • possible duplicate of [Wix: How to do a DirectorySearch in a custom installation location](http://stackoverflow.com/questions/7354619/wix-how-to-do-a-directorysearch-in-a-custom-installation-location) – Erti-Chris Eelmaa May 21 '14 at 13:45

0 Answers0