title: Is it possible to use a logical OR, or negate a condition in Installshield 2012 PRQs?
body: <p>I have a PRQ that installs <strong>MS SQL Shared Management Objects</strong>. I have a condition that installs the PRQ if this registry key does not exist</p>
  
  <pre class="lang-reg prettyprint-override"><code>HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{08ECC740-2B3E-45D7-860C-59B511386286}
  </code></pre>
  
  <p>This works fine until a user has SMO installed with a different product code - this happens to our dev team all the time when they install SQL2008. The installer the PRQ starts exists with an error.</p>
  
  <p>I need a better condition.  What I'd like to do is:
  If (Version &lt;= w.x.y.z || No Version found)
  Then install PRQ</p>
  
  <p>In the <strong>InstallShield Prerequisite editor</strong> it says</p>
  
  <blockquote>
    <p>The Following conditions must be met for the prerequisite to run. 
    Here you can define files and registry keys that the prerequisite will
    look for to determine if it should be run.  If there are no
    conditions, the prerequisite will always run.</p>
  </blockquote>
  
  <p>This agrees with my findings - the conditions are ANDed together.  Is there some unpublished sauce to OR or negate conditions in the XML?
  I'm vexed right now because looking to run a prq if the version in the registry is &lt; what I'm installing. </p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;conditions&gt;
      &lt;condition Type="32" Comparison="2" 
         Path="HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\SharedManagementObjects\CurrentVersion" 
         FileName="Version" ReturnValue="10.1.2531.0"&gt;
      &lt;/condition&gt;
  &lt;/conditions&gt;
  </code></pre>
  
  <p>Type="32" is 'A registry entry has a specified version value'
  Comparison="2" is 'Data on target system is less than specified data' </p>
  
  <p>Side question:  Is there a place where the Types and Comparisons are enumerated? </p>
  
  <p>This Comparison type doesn't have a comparison to state 'Data on target system is less than specified data <strong>or does not exist</strong>'.  As it is now, if the key exists at a lower version things work - but if the key doesn't exist (i.e. SMO isn't installed) the PRQ isn't installed.</p>
  
  <p>Is there a way to make this work?  The 'A file with certain version exists' condition does have a If the file's version is LESS THAN the version specified above (or the file IS NOT FOUND on the target system) option.   But it won't work to check a file installed by SMO - the user may have installed it to some drive other than C:.</p>
  
  <p>I'm hoping I'm missing something.  What would you do?  </p>