title: Determine Windows version in Inno Setup
body: <p>I'm using Inno Setup to change the recycle bin in the OS. I need to make some cases for if the user is running Windows 7 or Windows XP. I try using:</p>
  <pre class="lang-pascal prettyprint-override"><code>if not FileExists(winDir + '\System32\imageres.dll') then
    if not FileExists(winDir + '\System32\shell32.dll') then
      installError(3);
  </code></pre>
  <p>But it seems like it can't find <code>imageres.dll</code> or <code>shell32.dll</code> even though I've verified they exist. What am I doing wrong? Or can I check the Windows version another way?</p>