title: How to check registered DLLs in WiX
body: <p>I am looking for a way to test if certain third party libraries with certain versions have been installed. I want to check against registered dlls, and dont know where they were installed to in the filesystem. In this example I am making sure they have Prior version 1.50 installed:</p>
  
  <pre><code>&lt;Property Id="PRIORGUID"&gt;
    &lt;RegistrySearch Id="priorguid" Root="HKCR" Key="Prior.Encoders\CLSID" Type="raw"/&gt;
  &lt;/Property&gt;
  
  &lt;Property Id="PRIORLOCATION"&gt;
    &lt;RegistrySearch Id="priorlocation" Root="HKCR" Key="CLSID\[PRIORGUID]\InprocServer32" Type="file"/&gt;
  &lt;/Property&gt;
  
  &lt;Property Id="PRIORVERCHECK"&gt;
    &lt;DirectorySearch Id="priorversion" Path="[PRIORLOCATION]"&gt;
      &lt;FileSearch Name="Prior.dll" MinVersion="1.49"/&gt;
    &lt;/DirectorySearch&gt;
  &lt;/Property&gt;
  
  &lt;Condition Message="This application requires Prior."&gt;
    &lt;![CDATA[Installed OR PRIORVERCHECK]]&gt;
  &lt;/Condition&gt;
  </code></pre>
  
  <p>I basically find the library in the registry which points me to the file and then I look up the version in the file system. I am uneasy with this method. When I use Type="file", it seems to return a directory where the file is instead of returning the full path to the file itself. Does it always work this way? Also this means I have to know the base file name. If there was a way to split the full path into a name and directory then I could do the FileSearch without knowing the basename?</p>
  
  <p>Is my method reliable? Is there a better way to do this? It seems like this would be a common problem. I am using WiX 3.</p>
  
  <p>Thanks.</p>