title: Where does Delphi store the values of its environment variables?
body: <p>Delphi uses several environment variables with a name that starts with BDS which are displayed under Tools/Options/"Environment Variables". There are so called "System variables" which include the environment variables from Windows (ALLUSERSPROFILE, APPDATA, PATH etc.) but also some variables that are not inherited from Windows:</p>
  
  <ul>
  <li>BDS</li>
  <li>BDSBIN</li>
  <li>BDSCOMMONDIR</li>
  <li>BDSINCLUDE</li>
  <li>BDSLIB</li>
  <li>BDSPORJECTSDIR</li>
  <li>etc.</li>
  </ul>
  
  <p>They were apparently introduced with Delphi 2005 and their numbers have grown since.</p>
  
  <p>I could not find any place where they are stored, only references e.g. in the registry to $(BDSPORJECTSDIR). Apparently they can be overridden by the "user overrides" in the same dialog.</p>
  
  <p>The online help just gives me an unhelpful error "Cannotfind file %s" (which is a rather embarrassing error), the docwiki at
  <a href="http://docwiki.embarcadero.com/RADStudio/XE6/en/Environment_Variables" rel="nofollow noreferrer">http://docwiki.embarcadero.com/RADStudio/XE6/en/Environment_Variables</a>
  doesn't answer my question either, the only hint is "The BDS environment variable represents the installed location of RAD Studio."</p>
  
  <p>Does Delphi store these variables anywhere? Or are they just generated from the IDE/compiler from e.g. the file name of the executable?</p>
  
  <p>EDIT: Why did I not find the link to
  <a href="https://stackoverflow.com/questions/6870282/how-are-delphi-environment-variables-such-as-bds-evaluated">How are Delphi &#39;environment variables&#39; such as $(BDS) evaluated?</a>
  ? I certainly searched SO before posting this question.
  Yes, that answers my question. Thanks.</p>