title: How can this code to compare version information be improved?
body: <p>I have a problem with my logic to compare version information.</p>
  <p>Take this method:</p>
  <pre><code>bool CPTSDatabase::IsInstalledPublicTalksVersionSupported()
  {
      CSettingsStore store(TRUE, TRUE);
      CString strPath, strVersion;
      VS_FIXEDFILEINFO* pVerInfo = nullptr;
      bool bOK = false;
  
      if (store.Open(_T(&quot;Software\\Community Talks\\Public Talks&quot;)))
      {
          if (store.Read(_T(&quot;AppPath&quot;), strPath))
          {
              //yes, but is the path still valid
              if (PathFileExists(strPath))
              {
                  pVerInfo = theApp.ExtractVersionInformation(strPath, strVersion);
                  if (pVerInfo != nullptr)
                  {
                      if (HIWORD(pVerInfo-&gt;dwFileVersionMS) &gt;= 20 &amp;&amp;
                          LOWORD(pVerInfo-&gt;dwFileVersionMS) &gt;= 0 &amp;&amp;
                          HIWORD(pVerInfo-&gt;dwFileVersionLS) &gt;= 3)
                      {
                          bOK = true;
                      }
                  }
              }
          }
      }
  
      return bOK;
  }
  </code></pre>
  <p>The issue is this bit:</p>
  <pre><code>if (HIWORD(pVerInfo-&gt;dwFileVersionMS) &gt;= 20 &amp;&amp;
      LOWORD(pVerInfo-&gt;dwFileVersionMS) &gt;= 0 &amp;&amp;
      HIWORD(pVerInfo-&gt;dwFileVersionLS) &gt;= 3)
  {
      bOK = true;
  }
  </code></pre>
  <p>The executable in question is now <code>21.0.1</code> and ofcourse the <code>pVerInfo-&gt;dwFileVersionLS</code> test is failing. Is there a more robust wat to check that the version in question is greater than <code>20.0.3</code> without a lot of <code>if</code> clauses?</p>