Automatic account creation is now enabled. Captcha authentication required for account creation and editing unless you are trusted here.

FileSearch and MinVersion Weirdness

From WiX Wiki at MindCapers

Jump to: navigation, search

In a Nutshell

If you want a file to meet the MinVersion field requirement regardless of language, you must enter a value in the MinVersion field that is one less than the actual value.

Question

I'm trying to do a simple filesearch to verify the version number on a file:

 
  <Property Id="NVIDIADRIVERVER">
    <DirectorySearch Id="DriverDirectory" Path="[SystemFolder]Drivers">
      <FileSearch Name="nvlddmkm.sys" MinVersion="7.15.11.6369"/>
    </DirectorySearch>
  </Property>
 
  <Condition Message="!(loc.ConditionIncorrectDriverVersion)">
    <![CDATA[Installed and not NVIDIADRIVERVER]]>
  </Condition>
 

But this is always failing, and as far as I can tell the NVIDIADRIVERVER property is never getting set. What am I doing wrong?

Answer

You are probably bumping into this as found in the Signature Table help topic.

Note: The language specified in the Languages column is used in the comparison and there is no way to ignore language. If you want a file to meet the MinVersion field requirement regardless of language, you must enter a value in the MinVersion field that is one less than the actual value. For example, if the minimum version for the filter is 2.0.2600.1183, use 2.0.2600.1182 to find the file without matching the language information.

Personal tools